Array index out of bounds
#1

Error with "y_iterate".
ERROR:
HTML Code:
[08:22:46] [debug] Run time error 4: "Array index out of bounds"
[08:22:46] [debug]  Attempted to read/write array element at index 302 in array of size 302
Line ERROR:
HTML Code:
foreach(new c : Rellout) SetCameraBehindPlayer©, SetPlayerVirtualWorld(c, 0), SendClientMessage(c, -1, "End round."), Iter_Remove(Rellout, c);
Other:
HTML Code:
new Iterator:Rellout<MAX_PLAYERS>;
Reply
#2

I really doubt it's an issue with y_iterate. You need to post a detailed log of crashdetect and not just two lines if you want to help us find the problem. Compiling with debug info is very useful to get the exact line: https://github.com/Zeex/samp-plugin-...ith-debug-info
Reply
#3

This is the exact line I compiled with "-d3"
HTML Code:
foreach(new c : Rellout) SetCameraBehindPlayer©, SetPlayerVirtualWorld(c, 0), SendClientMessage(c, -1, "End round."), Iter_Remove(Rellout, c);
Reply
#4

Anyone? ...
Reply
#5

As I told you earlier, these two lines of crashdetect are only a part of it. Without the full output of the plugin, nobody can help you - we cannot just guess what is the problem (is it related to the loop itself, Iter_Remove etc.)

For now, all I can tell you is update to YSI 4 which this issue definitely not exists and if it persists to happen then the problem is with your code. Re-defining MAX_PLAYERS after including y_iterate might be a reason as well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)