help me to Accessing element at index 640 past array upper bound 599
#1

[10:50:07] [debug] AMX backtrace:
[10:50:07] [debug] #0 0006ef4c in ?? (1, 2, 1) from GM.amx
[10:50:07] [debug] #1 000162d8 in public OnPlayerStateChange (1, 2, 1) from GM.amx
[10:51:47] [debug] Run time error 4: "Array index out of bounds"
[10:51:47] [debug] Accessing element at index 639 past array upper bound 599
[10:51:47] [debug] AMX backtrace:
[10:51:47] [debug] #0 0006ef4c in ?? (0, 2, 1) from GM.amx
[10:51:47] [debug] #1 000162d8 in public OnPlayerStateChange (0, 2, 1) from GM.amx
[10:52:26] [debug] Run time error 4: "Array index out of bounds"
[10:52:26] [debug] Accessing element at index 639 past array upper bound 599

[10:47:09] [debug] Run time error 4: "Array index out of bounds"
[10:47:09] [debug] Accessing element at index 638 past array upper bound 599

[10:37:48] [debug] Run time error 4: "Array index out of bounds"
[10:37:48] [debug] Accessing element at index 640 past array upper bound 599

CODE OnPlayerStateChange: https://pastebin.com/vWPnMQsW
Reply
#2

Код:
 if(newcar == scooterlv[1] || newcar == scooterlv[2] || newcar == scooterlv[3] || newcar == scooterlv[4] || newcar == scooterlv[5] || newcar == scooterlv[6] || newcar == scooterlv[7] || newcar == scooterlv[8]
        || newcar == scooterlv[9] || newcar == scooterlv[10] || newcar == scooterlv[11] || newcar == scooterlv[12]) {
While this isn't causing this, you may want to look at making an enum for the vehicles, and using that to determine its 'type' as such. Just so you can check it without checking multiple vehicles.


Did you use -d3 as CrashDetect requires in the compiler options?
Reply
#3

Yes...
Reply
#4

Another thing to look at would be what arrays are 600 long, that would be being addressed at all in this section.

Are these the entire crash returns, or just the first few lines? This just seems like there isn't as much information as there should be.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)