Loops jumps over number 1
#4

Quote:
Originally Posted by Vince
Посмотреть сообщение
This code relies on assumptions, which is bad. It assumes that the first pickup to be created will have id 1, while that may not always be the case.

You start with x = 0. CreateDynamicPickup assigns it the value 1. x is then incremented. x is now 2. The next cycle will start with x = 2.
What do you mean assumes to create first pickup to be 1? :O My pickup id's starts with 0. Or maybe they may not do that?

So it's better to not have a 0.ini at all but start the creations at 1 instead in my "createbusiness" command?

EDIT: Understood now. Dynamic starts always with 1 instead of 0. Seems crazy once you've learned that mostly everything in programming starts with 0 but yeah, thanks!
Reply


Messages In This Thread
Loops jumps over number 1 - by Hansrutger - 21.12.2013, 18:41
Re: Loops jumps over number 1 - by Konstantinos - 21.12.2013, 18:51
Re: Loops jumps over number 1 - by Vince - 21.12.2013, 18:56
Re: Loops jumps over number 1 - by Hansrutger - 21.12.2013, 19:08

Forum Jump:


Users browsing this thread: 1 Guest(s)