AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Run time error 10 ... (https://forums.alliedmods.net/showthread.php?t=29136)

shino 05-30-2006 12:02

Run time error 10 ...
 
this is what i get after debugging:
L 05/30/2006 - 17:58:43: [CSTRIKE] Player out of range (0)
L 05/30/2006 - 17:58:43: [AMXX] Displaying debug trace (plugin "zombiebot.amxx")
L 05/30/2006 - 17:58:43: [AMXX] Run time error 10: native error (native "cs_set_user_team")
L 05/30/2006 - 17:58:43: [AMXX] [0] zombiebot.sma::TeamSet (line 122)

and here's the code:
Code:
114|public TeamSet(players[]) { 115|    new players[32],num,i,id 116|    get_players(players,num) 117|    for(i = 0; i <= num; i++) { 118|        id = players[i] 119|        if (!is_user_bot(id) && is_user_alive(id)) { 120|            cs_set_user_team(id,CS_TEAM_T) 121|        } else { 122|            cs_set_user_team(id,CS_TEAM_CT) 123|        } 124|    } 125|}

any help? :?

VEN 05-30-2006 12:04

Change "<=" to "<" (without quotes).


All times are GMT -4. The time now is 16:33.

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