Raised This Month: $ Target: $400
 0% 

Many errors. . . Anyone could help?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
speed4weed
Member
Join Date: Aug 2008
Old 04-16-2009 , 00:39   Many errors. . . Anyone could help?
Reply With Quote #1

/fixed

Last edited by speed4weed; 04-17-2009 at 08:41.
speed4weed is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-16-2009 , 06:38   Re: Many errors. . . Anyone could help?
Reply With Quote #2

PHP Code:
public RoundStart()
// ...
        
if(player_class[i] == Necromancer)
            
g_haskit[i]=1
        
else
            
g_haskit[i]=
defines, variables, etc are case sensitive ! you defined "Necromancer" as "NECROMANCER", also for Ninja, Paladin, and the rest of the classes, all fixed.

and also a function:
PHP Code:
public paladin(id){
    
showitem(id,"Paladin"," "," ","<br>Starts with 125hp and can cast Long Jump.<br> <br><br>")

this returned error when you called it Paladin(id) because it's named "paladin"... fixed

The loose indentation errors are caused by the code alignment errors, it does matter how the code is aligned.

PHP Code:
public award_plant()
{
    new 
Players[32], playerCountid
    get_players
(PlayersplayerCount"aeh""TERRORIST"
        
    for (new 
i=0i<playerCounti++) 
    {
        
id Players[i
        
Give_Xp(id,get_cvar_num("diablo_xpbonus"))    
        
client_print(id,print_chat,"You gained *%i* experience for bomb plant",get_cvar_num("diablo_xpbonus"))
    }    
        
Give_Xp(planter,get_cvar_num("diablo_xpbonus2"))

Give_Xp() is away from alignement as you can see... fixed


The:
error 017: undefined symbol "n"
error 029: invalid expression, ass
error 017: undefined symbol "w7"
fatal error 107: too many error messages on one line

errors are caused by a misplaced " in here:
PHP Code:
    format(text512"\ySelect Class - ^n\w1. Sorcerer [Increased effect of spells]^n\w2. Paladin [Bonus to strength]^n\w3. Monk [More Experienced gained]^n\w4. Assassin [Faster and no footsteps]^n\w5. Barbarian [Regain hitpoint upon kill]^n\w6. Necromancer [Returns some of the damage taken]"^n\w7Ninja [Fasthas only a knife and is invisible]") 
if you can see after the necromancer fixed.

another "error"...
PHP Code:
        case 5
        {    
            
player_class[id] = NECROMANCER
            g_haskit
[id] = 1
        
}
        case 
6
        {    
            
player_class[id] = NINJA
    

Don't forget the { and }'s ... if you have only one option you don't need them at all. fixed.

Compiles succesfully, don't know if any of your code actually works but that's your job sma attached.
Attached Files
File Type: sma Get Plugin or Get Source (dbmod.sma - 689 views - 190.8 KB)
__________________
Hunter-Digital is offline
Old 04-16-2009, 07:38
speed4weed
This message has been deleted by speed4weed.
Old 04-16-2009, 08:41
speed4weed
This message has been deleted by speed4weed. Reason: n/a
speed4weed
Member
Join Date: Aug 2008
Old 04-16-2009 , 11:02   Re: Many errors. . . Anyone could help?
Reply With Quote #5

Alright i fixed it up, and it compiles perfectly now, i just get this annoying message and it causes no classes to work, How can i fix this?

Message:
Code:
L 04/16/2009 - 10:55:52: Plugin called message_begin with an invalid message id (0).
L 04/16/2009 - 10:55:52: [AMXX] Run time error 10 (plugin "dbmod_5.4h.amxx") (native "message_begin") - debug not enabled!
L 04/16/2009 - 10:55:52: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
And when i put debug it goes
Code:
L 04/16/2009 - 10:52:15: [AMXX] Run time error 10: native error (native "message_begin")
L 04/16/2009 - 10:52:15: [AMXX]    [0] dbmod_5.4h.sma::write_hud (line 1364)
L 04/16/2009 - 10:52:15: [AMXX]    [1] dbmod_5.4h.sma::CurWeapon (line 765)
L 04/16/2009 - 10:52:27: Plugin called message_begin with an invalid message id (0).
L 04/16/2009 - 10:52:27: [AMXX] Displaying debug trace (plugin "dbmod_5.4h.amxx")
L 04/16/2009 - 10:52:27: [AMXX] Run time error 10: native error (native "message_begin")
L 04/16/2009 - 10:52:27: [AMXX]    [0] dbmod_5.4h.sma::show_deadmessage (line 1153)

L 04/16/2009 - 10:52:27: [AMXX]    [1] dbmod_5.4h.sma::DeathMsg (line 850)
L 04/16/2009 - 10:52:27: Plugin called message_begin with an invalid message id (0).
L 04/16/2009 - 10:52:27: [AMXX] Displaying debug trace (plugin "dbmod_5.4h.amxx")
Could anyone help me?
Attached Files
File Type: sma Get Plugin or Get Source (dbmod_5.4h.sma - 723 views - 191.7 KB)

Last edited by speed4weed; 04-16-2009 at 11:08.
speed4weed is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 04-16-2009 , 11:50   Re: Many errors. . . Anyone could help?
Reply With Quote #6

On line 1375, change
PHP Code:
    for (new id=0id 32id++) 
to
PHP Code:
    for (new id=1id <= g_maxplayersid++) 
Then, add this
PHP Code:
new g_maxplayers;
[...]
public 
plugin_init()
{
    [...]
    
g_maxplayers get_maxplayers();
    [...]

__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
speed4weed
Member
Join Date: Aug 2008
Old 04-16-2009 , 12:10   Re: Many errors. . . Anyone could help?
Reply With Quote #7

/fixed
Attached Files
File Type: zip Both files.zip (85.0 KB, 79 views)

Last edited by speed4weed; 04-17-2009 at 08:41.
speed4weed is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode