AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   whats wrong with isBot[get_user_userid(numbot)] = true;? (https://forums.alliedmods.net/showthread.php?t=13484)

[RKS]i/you.got.pwned 05-17-2005 19:19

whats wrong with isBot[get_user_userid(numbot)] = true;?
 
I get this error:
Code:

L 05/17/2005 - 16:07:25: [AMXX] Run time error 4 (index out of bounds) on line 46 (file "Fakefull.sma").
This is line 46 and the event around it.
Code:
public create(id) {     new arg[32];     read_argv(1, arg, 31);         numbot = engfunc(EngFunc_CreateFakeClient,arg);     isBot[get_user_userid(numbot)] = true; //line 46         return PLUGIN_HANDLED; }

Any suggestions?
i/you.got.pwned

teame06 05-17-2005 21:09

I think it means that the number that get_user_id(numbot) is greater than the one that has been set. So it is outbound of what is possible.


new bool:isBot[33] = false

i have seem some userid up in the 3000+. So the index range that it set it 33. So any bigger than 33 i think it will give what you said. index out of bound.

Because i don't know the output of numbot. I can't help you any further than this.


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

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