Requesting an explanation/fix
#1

Код:
[15:28:05] [debug] Run time error 4: "Array index out of bounds"
[15:28:05] [debug]  Accessing element at index 16 past array upper bound 15
[15:28:05] [debug] AMX backtrace:
[15:28:05] [debug] #0 00041e54 in public ELC_AC_OnGameModeInit (0) from Roleplay.amx
[15:28:05] [debug] #1 native CallLocalFunction () from samp-server.exe
[15:28:05] [debug] #2 000231bc in public SSCANF_OnGameModeInit () from Roleplay.amx
[15:28:05] [debug] #3 00011640 in public Itter_OnGameModeInit () from Roleplay.amx
[15:28:05] [debug] #4 native CallLocalFunction () from samp-server.exe
[15:28:05] [debug] #5 00010be0 in ?? () from Roleplay.amx
[15:28:05] [debug] #6 000056d4 in public ScriptInit_OnGameModeInit () from Roleplay.amx
[15:28:05] [debug] #7 00000b0c in public zcmd_OnGameModeInit () from Roleplay.amx
[15:28:05] [debug] #8 native CallLocalFunction () from samp-server.exe
[15:28:05] [debug] #9 00000600 in public OnGameModeInit () from Roleplay.amx
Reply
#2

You exceed an array somewhere in OnGameModeInit callback, probably in a loop.

The same error occurs in the following example:
new array[10];
printf("%d", array[10]);
You may only access indexes 0-9.
Reply
#3

Quote:
Originally Posted by CrossUSAAF
Посмотреть сообщение
You exceed an array somewhere in OnGameModeInit callback, probably in a loop.

The same error occurs in the following example:
new array[10];
printf("%d", array[10]);
You may only access indexes 0-9.
Took me long enough, but yeah, I got it, thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)