[solved] When I run the game it enters the main loop and doesn't continue

T

The_Vecter

Guest
when I hit run the compile window pops up and after loading stuff in it says this:
**********************************.
Entering main loop.
**********************************.
and stays like that. I have to get task manager and end the task manually. I don't know what caused it and I googled it, people were saying it was if a loop didn't end and i checked the loops that i put in to make it not work.
 

obscene

Member
Trial and error. Delete objects from the first room in your game, run it. If it works, you know it's not GM. Then add objects. When you get the hang again, start in that object's create event and add a show_debug_message("Not here") to the end of it. If you see that message, you try another event. Then you narrow it down to bits of code.
 
T

The_Vecter

Guest
Thanks! I found out what object was causing it but now i need to find what loop is causing it.
 

obscene

Member
You'll get it. You can put debug messages before and after each loop and you'll see where it's getting stuck. Be careful if you put debug messages inside loops because if you get and endless loop and let it run for even a few seconds GM will hang for quite a while after you exit writing all that to the compile window, so be prepared to exit quickly.
 
T

The_Vecter

Guest
I fixed it! Thanks so much!
 
Last edited by a moderator:
Top