Looping through 2000+ Iterations
#10

Like I said before, the vehicle ids start at 1 and end at 1999. MAX_VEHICLES might be 2000, but the vehicle limit is 1999. If you're really worried saving a tiny bit of memory you can do

pawn Код:
new gVehicleModel[MAX_VEHICLES-1];
for(new vehicleid = 1; vehicleid < MAX_VEHICLES; vehicleid++) {
    gVehicleModel[vehicleid - 1] = GetVehicleModel(vehicleid);
}
but it's easier to just ignore the first array element

pawn Код:
new gVehicleModel[MAX_VEHICLES];
for(new vehicleid = 1; vehicleid < MAX_VEHICLES; vehicleid++) {
    gVehicleModel[vehicleid] = GetVehicleModel(vehicleid);
}
Reply


Messages In This Thread
Looping through 2000+ Iterations - by ledzep - 24.10.2009, 08:15
Re: Looping through 2000+ Iterations - by Dabombber - 24.10.2009, 10:40
Re: Looping through 2000+ Iterations - by Westie - 24.10.2009, 11:20
Re: Looping through 2000+ Iterations - by ledzep - 24.10.2009, 11:54
Re: Looping through 2000+ Iterations - by yom - 24.10.2009, 12:07
Re: Looping through 2000+ Iterations - by Westie - 24.10.2009, 12:08
Re: Looping through 2000+ Iterations - by MadeMan - 24.10.2009, 12:09
Re: Looping through 2000+ Iterations - by ledzep - 24.10.2009, 12:36
Re: Looping through 2000+ Iterations - by Westie - 24.10.2009, 12:41
Re: Looping through 2000+ Iterations - by Dabombber - 24.10.2009, 12:52

Forum Jump:


Users browsing this thread: 2 Guest(s)