Looping through 2000+ Iterations
#1

MAX_VEHICLES is 2000

Код:
for(new v = 1; v < MAX_VEHICLES; v++)
- Works fine, but this would loop would end at 1999 iterations because 1999 is less than 2000, but 2000 is not less than 2000

Код:
for(new v = 1; v <= MAX_VEHICLES; v++)
- Would be the most convenient, but this causes script to stop for some reason

I can, however, get the loop to run through exactly 2000 iterations by not initializing the variable "v" ("v" would start at 0 instead of 1)
But this is not very convenient when working with vehicleid's because vehicleid's start at 1.

Anybody else experiencing this problem?

UPDATE: This also seems to be true for while
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)