#Game not playing, no error, no crash

1 messages · Page 1 of 1 (latest)

half flower
#

Hello, I made a simple game and it isn't starting. It used to work but now it compiles everything but doesn't open to actual game. I updated runtime and have the newest version.

I have attached the output.

rose urchin
#

if it does compile but the game doesn't appear, it's possible you have an infinite loop immediately upon starting the game

#

if you run with the debugger instead and then hit the pause button when it's done compiling, what happens?

half flower
#

if instance_number(Obj_boy)
<1
if instance_number(obj_girl)
<1
{room_goto(r_gameover_menu)}

#

it says this in debugger

rose urchin
#

ok you're most likely stuck in an infinite loop of room_goto then

#

where is that code located? What object?

half flower
#

this is the stop event of my global controller object

#

step

rose urchin
#

ok yeah if the gameover room does not have any instances of obj_boy or obj_girl, you'd get stuck running room_goto over and over

#

try making it this

if instance_number(Obj_boy) <1 and instance_number(obj_girl)
< 1 and room != r_gameover_menu
{room_goto(r_gameover_menu)}``` have it check that you're not already in the gameover room
half flower
#

THANK YOOUUU SOOO MUCH IM 12 AND IM LEARNING TO CODE!!!!!!

rose urchin
#

what was happening is that it got stuck going to a new room over and over and couldn't ever get to the part of the code that actually makes the game appear haha