• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - IDE FAILED: Run Program Complete (GMS2) [SOLVED]

I have been working on a project all day with no problem until just recently when I added a new sprite asset to my game and when I tried to run it, it won't run. I've tried it a few more times, restarted Game Maker Studio 2, cleaned the cache and the game still won't run.

I opened up a different game I'm working on and that one runs. So I really don't know what's going on. This has never happened before and just minutes before, the game was running.

If anyone could help point out what might be the case that would be very helpful.

Also, if I need to include a log or error code that I don't know about please let me know.

in the output is has a long log and then shows "FAILED: Run Program Complete".

Game Maker Studio 2
IDE version is: v2.2.1.375
Runtime version is: v2.2.1.291
 
in the output is has a long log and then shows "FAILED: Run Program Complete".
Then you're going to have to show us the entirety of the output (put it in code tags or a spoiler) as 99% of these that I have seen recently are because there is actually an error shown in the output, but everyone is too busy looking just at the last line "FAILED: Run Program Complete"
 
Error : gml_Object_o_tree_enemy_moving_Create_0(10) : enum "tree_enemy" has already been defined
And right there is your error. It even says Error
It looks like in the Create Event of your object o_tree_enemy_moving you have defined an enum called tree_enemy, but you have already defined that enum somewhere else in another script or object.

You can either remove it from the Create Event of this object, or from wherever else it is defined (do a global search for tree_enemy and see where it has been defined). Once you sort it out that it is only defined in one place, then it should compile.

This is why it is always a good idea to look at the whole output and not just the last line as by reading this you can easily see that you have an error, what it is, and where it is.
 
And right there is your error. It even says Error
It looks like in the Create Event of your object o_tree_enemy_moving you have defined an enum called tree_enemy, but you have already defined that enum somewhere else in another script or object.

You can either remove it from the Create Event of this object, or from wherever else it is defined (do a global search for tree_enemy and see where it has been defined). Once you sort it out that it is only defined in one place, then it should compile.

This is why it is always a good idea to look at the whole output and not just the last line as by reading this you can easily see that you have an error, what it is, and where it is.
Thanks for pointing that out! It now works!

But that's very odd why the whole game wouldn't run without showing the usual error message in the pop up window. That's why I didn't know what was going on. I've even had cases where I did forget to change to enums that where the same and it gave me the error message in the pop up that it was about the enums.

I wonder why it didn't show the usual error message?
 
I wonder why it didn't show the usual error message?
Certain things will not get found as errors until the compile. Enums and Macros do not get replaced until compile-time, so as far as the IDE is concerned there is no problem until the compile actually happens. This is why you need to read the output if you get any failure to run, as it may be that in the IDE there is no error being found, but at compile/build time something becomes an error.

Also, if the error happens in the compile then your game has not reached a point where it can actually run (and therefore throw the error popup).
 
Certain things will not get found as errors until the compile. Enums and Macros do not get replaced until compile-time, so as far as the IDE is concerned there is no problem until the compile actually happens. This is why you need to read the output if you get any failure to run, as it may be that in the IDE there is no error being found, but at compile/build time something becomes an error.

Also, if the error happens in the compile then your game has not reached a point where it can actually run (and therefore throw the error popup).
Thanks again. I have the output window minimized the most and don't really pay attention too it. But I will from now on.
 
Top