Looping through 2000+ Iterations
#2

Your script is crashing because it's trying to access array[MAX_VEHICLES] which is outside the array. I think the maximum number of vehicles is actually MAX_VEHICLES - 1 (it was in 0.2), so the first loop is correct. Initialise the variable to 1 and ignore the first element, one wasted slot out of 2000 isn't really that much of a problem.
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: 1 Guest(s)