ID:141737
 
Code:


Problem description:

well, when i compile and test the game.. it takes byond like 10 minutes to open the dream seeker... its not cuz my computer cuz when i open other games i got and live games they work right away.. what part of a code can be blocking it from opening? help plz
Any infinite loops without some sort of delay in them like "sleep(1)" will definately do that. I've experienced that the hard way.
In response to Mizukouken Ketsu
what do infinitie loops look like?
In response to Agrey123
They can come in a variety of forms:

Look for the 'for' statements used in your code.

Look for the 'while' statements used in your code.

Look for a procedure calling itself again, or a proc calling another proc which calls that proc again etc...

Those are the basic loops. However I'm not so sure this is a loop problem, because it it was, the dream seeker would detect it and let you know: "Error maximum recursion level reached", something along those lines. You have to make sure you're not setting the hide loops variable, as well.

If it's none of these, I think it's a bug with Dream Seeker (at least, I've heard a lot of people complaining about it)
Try compiling & testing the game seperately (do a build->compile first, before trying build->run). Is it compiling that takes 10 minutes, or running that does?
In response to Agrey123
That's not a very good question, but since you've asked... :P
proc
A()
for()
world << "This message loops forever!"
B()
while(1)
world << "This message loops forever!"
C()
:start
world << "This message loops forever!"
goto start
D()
world << "This message loops forever!"
spawn(-1)
D()

mob
var/mob/pet/my_pet
New()
src.my_pet = new(src.loc) //infinite loop

As for what an infinite loop is, it's a loop that never ends; continues on forever, hence its name. Not all such loops could be considered strictly infinite though *forever* (or as long as the game runs), it's basically a term for loops that iterate on unconditionally.
If you have such a loop that doesn't have a delay (pause/stop) in it (such as a delay imposed by sleep() or spawn()), it will bog down your world because it keeps the processor busy, effectively locked in that loop, processing it over and over.
As you can see above, infinite loops could be direct and indirect, and some can be harder to spot than others.