16.03.2016, 21:26
Quote:
Since you've compiled with debug info just wait for the run time error to occur again and in the server log you'll get more information from crashdetect plugin. Post that part and the code from IsTruckerVehicle function.
|
PHP код:
[23:25:17] [debug] Run time error 4: "Array index out of bounds"
[23:25:17] [debug] Accessing element at index 9 past array upper bound 8
[23:25:17] [debug] AMX backtrace:
[23:25:17] [debug] #0 00334408 in IsTruckerVehicle (vehicleid=1) at C:\Users\Brooks\Desktop\test\gamemodes\gm.pwn:48371
[23:25:17] [debug] #1 0007e824 in ?? (... <1 argument>) at C:\Users\Brooks\Desktop\test\gamemodes\gm.pwn:7634
[23:25:17] [debug] #2 0001cbe0 in public OnVehicleSpawn (vehicleid=1) at C:\Users\Brooks\Desktop\test\pawno\include\YSI\y_hooks/impl.inc:798
[23:25:17] [debug] #3 native SetVehicleToRespawn () from samp-server.exe
[23:25:17] [debug] #4 0006e0b0 in ?? () at C:\Users\Brooks\Desktop\test\gamemodes\gm.pwn:6121
[23:25:17] [debug] #5 0001c1b8 in public RL_OnGameModeInit () at C:\Users\Brooks\Desktop\test\pawno\include\YSI\y_hooks/impl.inc:484
[23:25:17] [debug] #6 native CallLocalFunction () from samp-server.exe
[23:25:17] [debug] #7 0000cb30 in public zcmd_OnGameModeInit () at C:\Users\Brooks\Desktop\test\pawno\include\OPSP.inc:240
[23:25:17] [debug] #8 native CallLocalFunction () from samp-server.exe
[23:25:17] [debug] #9 0000aa18 in public SSCANF_OnGameModeInit () at C:\Users\Brooks\Desktop\test\pawno\include\zcmd.inc:68
[23:25:17] [debug] #10 000040bc in public Itter_OnGameModeInit () at C:\Users\Brooks\Desktop\test\pawno\include\sscanf2.inc:205
[23:25:17] [debug] #11 native CallLocalFunction () from samp-server.exe
[23:25:17] [debug] #12 00003008 in public ScriptInit_OnGameModeInit () at C:\Users\Brooks\Desktop\test\pawno\include\YSI\y_iterate.inc:791
[23:25:17] [debug] #13 00001c28 in public OnGameModeInit () at C:\Users\Brooks\Desktop\test\pawno\include\YSI\internal\..\y_scriptinit.inc:171
PHP код:
stock IsTruckerVehicle(vehicleid)
{
for(new i=0; i<10; i++)
{
if(vehicleid == JobInfo[JOB_TRUCKER][jCars][i]) return 1;
}
return 0;
}