AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   need help with 4 errors.. (https://forums.alliedmods.net/showthread.php?t=95471)

HLM 06-23-2009 22:54

need help with 4 errors..
 
my errors have been resolved, thanks!

fysiks 06-24-2009 01:12

Re: need help with 4 errors..
 
Wow . . . You really need to read some tutorials.

Go through your code and see if it fits the pattern:
PHP Code:

if( is_user_alive(id) )
{
    
// Do stuff for if the user is alive
}
else
{
    
// Do stuff here for if the user is dead


str_to_num() returns an integer so you cannot compare it to a string ("1"). Also, str_to_num("on") will probably return 0 as will str_to_num("off").

Braces, Brackets, and Parentheses always come in pairs.

HLM 06-24-2009 01:39

Re: need help with 4 errors..
 
Okay, so str_to_num is out of the question... I completely reworked the code in hopes of a better build, now using arguments.. I think I MIGHT be closer..

fysiks 06-24-2009 18:43

Re: need help with 4 errors..
 
It's bad forum etiquette to delete your original post, BTW.


All times are GMT -4. The time now is 15:36.

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