Run time error 4: "Array index out of bounds" help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Run time error 4: "Array index out of bounds" help (
/showthread.php?tid=558366)
Run time error 4: "Array index out of bounds" help -
GGW - 16.01.2015
[SOLVED]
Re: Run time error 4: "Array index out of bounds" help -
Jefff - 16.01.2015
new f = MAX_OBJ+1; = MAX_OBJ + 1 = 117 + 1 = 118
if player is not in any range 'f' is still 118
so 'f' will crash array here -> DestroyObject(dGunData[f][ObjID]);
Re: Run time error 4: "Array index out of bounds" help -
GGW - 16.01.2015
Thanks For Your Help ! +rep