[07:00:22] [debug] Run time error 4: "Array index out of bounds"
[07:00:22] [debug] Accessing element at index 250 past array upper bound 249
[07:00:22] [debug] AMX backtrace:
[07:00:22] [debug] #0 0038b9a4 in public SSCANF_OnGameModeInit () from Lko.amx
[07:00:22] [debug] #1 0001ac80 in ?? () Lko.amx
[07:00:22] [debug] #2 0000557c in public ScriptInit_OnGameModeInit () from Lko.amx
[07:00:22] [debug] #3 00001194 in public OnGameModeInit () from Lko.amx
for(new i = 0; i < 1000; i++)
{
CreateDynamic3DTextLabel("Battery Ment", 0x00BFFFFF, ALocations[i][LocX], ALocations[i][LocY], ALocations[i][LocZ], 30.0);
}
I don't think that's the code caused it. It says the size of the array is 250 and in the loop, it's 1000 which is way too far. You're looking for an array with size 250 and probably in a loop.
Nevertheless, you can find the exact line caused the run time error by using debug info: https://github.com/Zeex/samp-plugin-...ith-debug-info Re-compile your scripts and run the server. If it prints information again with the [debug] prefix, post your new server log. |
for(new i = 0; i < sizeof (ALocations); i++)
{
CreateDynamic3DTextLabel("Battery Ment", 0x00BFFFFF, ALocations[i][LocX], ALocations[i][LocY], ALocations[i][LocZ], 30.0);
}
[08:15:52] [debug] Run time error 4: "Array index out of bounds"
[08:15:52] [debug] Accessing element at index 300 past array upper bound 299
[08:15:52] [debug] AMX backtrace:
[08:15:52] [debug] #0 003a4e64 in ?? (0x00000000) from Lko.amx
[08:15:52] [debug] #1 0038f0a4 in public Streamer_OnPlayerConnect (0x00000000) from Lko.amx
[08:15:52] [debug] #2 00020898 in public SSCANF_OnPlayerConnect (0x00000000) from Lko.amx
[08:15:52] [debug] #3 0001ad54 in ?? (0x00000000) from Lko.amx
[08:15:52] [debug] #4 000058fc in public OnPlayerConnect (0x00000000) from Lko.amx