- 44
- 75
Привет, в pawno не гуру, столкнулся с такими строками в логе сервера:
[debug] Run time error 4: "Array index out of bounds"
[debug] Accessing element at negative index -548
[debug] AMX backtrace:
[debug] #0 00bbef3c in public ac_OnVehicleSpawn (vehicleid=310) at D:\s\gamemodes\mode.pwn:18256
[debug] #1 0003d480 in public OnVehicleSpawn (vehicleid=310) at D:\s\pawno\include\nex-ac.inc:5572
[debug] #2 native SetVehicleToRespawn () from samp03svr
[debug] #3 0001a858 in public ac_SetVehicleToRespawn (vehicleid=310) at D:\s\pawno\include\nex-ac.inc:1369
[debug] #4 0001d2cc in acc_SetVehicleToRespawn (vehicleid=310) at D:\s\pawno\include\nex-ac.inc:2371
[debug] #5 00f3e5bc in RespawnCars (first=1, endcar=835) at D:\s\gamemodes\mode.pwn:74160
[debug] #6 00f51944 in public RespawnCarss (playerid=0) at D:\s\gamemodes\mode.pwn:75105
[debug] Run time error 4: "Array index out of bounds"
[debug] Accessing element at negative index -547
Подскажите, как исправить?
[debug] Run time error 4: "Array index out of bounds"
[debug] Accessing element at negative index -548
[debug] AMX backtrace:
[debug] #0 00bbef3c in public ac_OnVehicleSpawn (vehicleid=310) at D:\s\gamemodes\mode.pwn:18256
[debug] #1 0003d480 in public OnVehicleSpawn (vehicleid=310) at D:\s\pawno\include\nex-ac.inc:5572
[debug] #2 native SetVehicleToRespawn () from samp03svr
[debug] #3 0001a858 in public ac_SetVehicleToRespawn (vehicleid=310) at D:\s\pawno\include\nex-ac.inc:1369
[debug] #4 0001d2cc in acc_SetVehicleToRespawn (vehicleid=310) at D:\s\pawno\include\nex-ac.inc:2371
[debug] #5 00f3e5bc in RespawnCars (first=1, endcar=835) at D:\s\gamemodes\mode.pwn:74160
[debug] #6 00f51944 in public RespawnCarss (playerid=0) at D:\s\gamemodes\mode.pwn:75105
[debug] Run time error 4: "Array index out of bounds"
[debug] Accessing element at negative index -547
Подскажите, как исправить?
C++:
publics RespawnCarss(playerid)
{
RespawnCars(1, ADD_VEHICLES);
return true; //75105
}
------
{
SetDoorsStatus(vehicleid, 0);
CarInfo[vehid][cLock] = 0; //18256
if(VehicleInfo[vehicleid][vJob]!=0)VehicleInfo[vehid][vLock]=0;
}
------
for(new i = first; i <= endcar;i ++)
{
if(IsVehicleConnected(i))
{
if(!Occuped[i])
{
SetVehicleToRespawn(i);
SetEngineStatus(i, false, -1); //74160
}
}
}
return true;
}
Последнее редактирование: