ID:1640173
 
(See the best response by DarkCampainger.)
Problem description:
I've compiled my project but after i run it, the dream seeker window doesnt show. Tskmngr shows that the process for DreamSeeker is running. Happened right after i added in some combat AI codes. No errors or warnings were showed

mob
proc/EnemyCombatAI()
while(src)
for(var/mob/M in oview())
if(!(src.Faction.Find(M.tagT)))
if(get_dist(src,M)<=1)
src.dir=get_dir(src,M)
src.Fight()
else
step_to(src,M)
break
else
spawn() EnemyCombatAI()
sleep(rand(4,8))
mob
proc/AllyCombatAI()
while(src)
for(var/mob/M in oview())
if(!(src.Faction.Find(M.tagT)))
if(get_dist(src,M)<=1)
src.dir=get_dir(src,M)
src.Fight()
else
step_to(src,M)
break
else
spawn() AllyCombatAI()
sleep(rand(4,8))
You've written an infinite loop that is hanging the game before it can fully start.

You're using a while() loop to keep the AI running for the course of its life (later on you should look into only running the AI when players are near, but that's another discussion). However, you're also spawn()ing off a second AI loop any time you find an "ally", causing a potentially infinite number of loops to be running simultaneously for each AI.
any suggestions of a different loop method?
Best response
Either a while() or spawn() loop would be fine. Your problem is that you're using both.

I would say just remove the else spawn() [Ally/Enemy]CombatAI() lines and you should be good to go.