Array index out of bounds OnGameModeInit
#1

Hello there, anyone can tell me why this is happening? I know that MAX_VEHICLES is 2000 so there might be something under OnGameModeInit that isn't checked with INVALID_VEHICLE_ID?
I would like to to mention that this problem accours in the middle of OnGameModeInit code and the rest of the code isn't executed at all.
pawn Код:
[05:06:16] [debug] Run time error 4: "Array index out of bounds"
[05:06:16] [debug]  Accessing element at index 65535 past array upper bound 1999
[05:06:16] [debug] AMX backtrace:
[05:06:16] [debug] #0 0003dda4 in ?? () from LG-RP.amx
[05:06:16] [debug] #1 0006b694 in public IRC_OnGameModeInit () from LG-RP.amx
[05:06:16] [debug] #2 native CallLocalFunction () [00472e50] from samp-server.exe
[05:06:16] [debug] #3 00025958 in public RL_OnGameModeInit () from LG-RP.amx
[05:06:16] [debug] #4 native CallLocalFunction () [00472e50] from samp-server.exe
[05:06:16] [debug] #5 00024908 in ?? () from LG-RP.amx
[05:06:16] [debug] #6 0000d008 in public Itter_OnGameModeInit () from LG-RP.amx
[05:06:16] [debug] #7 native CallLocalFunction () [00472e50] from samp-server.exe
[05:06:16] [debug] #8 00008018 in public ScriptInit_OnGameModeInit () from LG-RP.amx
[05:06:16] [debug] #9 00006f9c in public zcmd_OnGameModeInit () from LG-RP.amx
[05:06:16] [debug] #10 native CallLocalFunction () [00472e50] from samp-server.exe
[05:06:16] [debug] #11 00006a90 in public SSCANF_OnGameModeInit () from LG-RP.amx
[05:06:16] [debug] #12 native CallLocalFunction () [00472e50] from samp-server.exe
[05:06:16] [debug] #13 00000d6c in public OnGameModeInit () from LG-RP.amx
Reply
#2

Show ongamemodeinit callback
Reply
#3

You have to show us the code so we can see what you have done wrong.
Reply
#4

Invalid modelid would return INVALID_VEHICLE_ID.

Compile with debug info so you can get the exact line: https://github.com/Zeex/samp-plugin-...ith-debug-info
Reply
#5

Nevermind I found the problem, thanks anyway everyone.
my plugins were out of date and after updating them the problem accour.
I had to check the script & delete the unneccery stuff. Therefore after debuging for a while it just stopped show the warning and the gamemode fully loaded.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)