AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Help] Index out of bounds (https://forums.alliedmods.net/showthread.php?t=233220)

connoisseur 01-11-2014 13:09

[Help] Index out of bounds
 
Spoiler

Error:
Code:

[AMXX] Displaying debug trace (plugin "replacec4.amxx")
[AMXX] Run time error 4: index out of bounds
[AMXX]    [0] replacec4.sma::ReplaceC4 (line 41)


SpeeDeeR 01-11-2014 13:47

Re: [Help] Index out of bounds
 
Code:
random_num(0, sizeof g_sNewModel)
returns a number between 0 and 2 and g_sNewModel[2] is out of bounds.
Use random() instead.


All times are GMT -4. The time now is 10:06.

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