27.05.2014, 14:00
Код:
[17:11:18] [debug] Run time error 4: "Array index out of bounds" [17:11:18] [debug] Accessing element at index 10 past array upper bound 9 [17:11:18] [debug] AMX backtrace: [17:11:18] [debug] #0 00064d40 in AssignVehicleTickets (vehicleid=71, tickets[]=@0x05edbb68 "0|0|0|0|0|0|0|0|0|0") at E:\Multe\Servere SA-MP\Rappy GM\LS-RP Main Server Files\gamemodes\lsrp.pwn:5005 [17:11:18] [debug] #1 000e7b2c in public OnPlayerSpawnVehicle (playerid=0, slot=2) at E:\Multe\Servere SA-MP\Rappy GM\LS-RP Main Server Files\gamemodes\lsrp.pwn:14612 [17:11:30] [debug] Run time error 4: "Array index out of bounds" [17:11:30] [debug] Accessing element at index 10 past array upper bound 9 [17:11:30] [debug] AMX backtrace: [17:11:30] [debug] #0 000649f0 in CountVehicleTickets (vehicle=71) at E:\Multe\Servere SA-MP\Rappy GM\LS-RP Main Server Files\gamemodes\lsrp.pwn:4978 [17:11:30] [debug] #1 00096970 in public RL_OnPlayerStateChange (playerid=0, newstate=2, oldstate=1) at E:\Multe\Servere SA-MP\Rappy GM\LS-RP Main Server Files\gamemodes\lsrp.pwn:9130 [17:11:30] [debug] #2 native CallLocalFunction () [00472ad0] from samp-server.exe [17:11:30] [debug] #3 00031138 in public OnPlayerStateChange (playerid=0, newstate=2, oldstate=1) at E:\Multe\Servere SA-MP\Rappy GM\LS-RP Main Server Files\pawno\include\OPSP.inc:304 [17:12:04] [debug] Run time error 4: "Array index out of bounds" [17:12:04] [debug] Accessing element at index 10 past array upper bound 9
pawn Код:
stock AssignVehicleTickets(vehicleid, tickets[])
{
new tmp[MAX_CAR_TICKETS][32];
explode(tmp, tickets, "|");
for(new i = 0; i < MAX_CAR_TICKETS; i ++)
{
VehicleInfo[vehicleid][carTicket][i] = strval(tmp[i]);
}
}
pawn Код:
stock CountVehicleTickets(vehicle)
{
new count = 0;
for(new i = 0; i < MAX_CAR_TICKETS; i++)
{
if(VehicleInfo[vehicle][carTicket][i] != 0)
{
count++;
}
}
return count;
}
Note : They show up when I spawn my private vehicle.