27.05.2014, 13:00
Okay, let me explain it better. I don't know your code so I'll give few examples instead.
Let's say you have:
If you have 10 vehicles and PlayerInfo[playerid][pVehicles] is 10, by doing:
it will loop from 1 to 10. As I said, the last (in this example) will be 9 and passing 10 is an invalid index and it causes run time error 4.
Let's say you have:
pawn Код:
new VehicleStatus[MAX_PLAYERS][10][some_enum];
// 10 vehicles (valid indexes 0-9)
pawn Код:
for(new i = 1; i <= PlayerInfo[playerid][pVehicles]; i++)