24.10.2009, 08:15
MAX_VEHICLES is 2000
- Works fine, but this would loop would end at 1999 iterations because 1999 is less than 2000, but 2000 is not less than 2000
- 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
Код:
for(new v = 1; v < MAX_VEHICLES; v++)
Код:
for(new v = 1; v <= MAX_VEHICLES; v++)
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