AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   no error (https://forums.alliedmods.net/showthread.php?t=60556)

kp_uparrow 09-07-2007 00:14

no error
 
new humans
for(new i=1;i<33;i++){

if(get_user_team(i)==2||get_user_team(i)==1){
humans++

}
}

why DOESN'T this make any errors? no INVALID PLAYER s

purple_pixie 09-07-2007 05:57

Re: no error
 
Why should it ?

You can get_user_team() even if the player isn't connected.

So long as the function doesn't set anything, you can usually get what you like.
(But it will probably be 0 )


EDIT: In this specific example it returns -1.

cs_get_user_team() would log an error.
get_user_team is fine.

cstrike obviously cares more than amxmodx does.

kp_uparrow 09-07-2007 19:18

Re: no error
 
well its crashes my server and i didnt know why, then i found this

i think errors reports are better than not letting people figure out whats the problem


All times are GMT -4. The time now is 07:58.

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