Sizeof 2D array
#4

Quote:
Originally Posted by introzen
Посмотреть сообщение
Try this:

pawn Код:
for(new v=0; v <= sizeof(JobVehicle[PlayerInfo[playerid][pJob]]) v++) {
    if(IsValidVehicle(v)) SetVehicleParamsForPlayer(v, playerid, 0 0);
}
You forgot to to create the actual loop by adding "v++" to it. I also added "<=" as the first vehicle in the array else wouldn't be affected by the loop (if i'm not mistaken. Was a long time ago I did programming).
Sorry i forgot to include that in the post, edited.
Still the same errors.
Reply


Messages In This Thread
Sizeof 2D array - by CalvinC - 19.03.2016, 17:43
Re: Sizeof 2D array - by YouServ - 19.03.2016, 17:52
Re: Sizeof 2D array - by introzen - 19.03.2016, 17:55
Re: Sizeof 2D array - by CalvinC - 19.03.2016, 18:03
Re: Sizeof 2D array - by Vince - 19.03.2016, 18:05
Re: Sizeof 2D array - by introzen - 19.03.2016, 18:25
Re: Sizeof 2D array - by Vince - 19.03.2016, 19:47

Forum Jump:


Users browsing this thread: 1 Guest(s)