Raised This Month: $ Target: $400
 0% 

Many errors. . . Anyone could help?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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