Run Time Error 4
#1

Someone Can Help me?? How to Fix This

[23:37:44] [debug] Run time error 4: "Array index out of bounds"
[23:37:44] [debug] Accessing element at index 72 past array upper bound 71
[23:37:44] [debug] AMX backtrace:
[23:37:44] [debug] #0 003d8ddc in public AddCar (72) from
[23:37:44] [debug] #1 003a3290 in public Itter_OnGameModeInit () from
[23:37:44] [debug] #2 native CallLocalFunction () from samp03svr
[23:37:44] [debug] #3 00003940 in public Streamer_OnGameModeInit () from
[23:37:44] [debug] #4 native CallLocalFunction () from samp03svr
[23:37:44] [debug] #5 00002490 in public OnGameModeInit () from
[23:37:44]
[23:37:44]
[23:37:44] U-RP v1.09.1
[23:37:44] ______________
[23:37:44]
[23:37:44] Number of vehicle models: 82
Reply
#2

Do you have a loop that calls AddCar in OnGameModeInit callback? Post both the function and the part of code from the callback as it should prevent from accessing the invalid index inside the function but at the same time, it shouldn't call the function in the first place for a value greater than the size of the array.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)