• 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.

Windows FATAL ERROR

I get this when trying to reference my sound file ANYWHERE I put it. I get this and I have no idea why, it doesn't do it in any of my other games. Wtf is going on?
___________________________________________
############################################################################################
FATAL ERROR in Room Creation Code for room rm_00

Variable __YYInternalObject__4.room_music(100084, -2147483648) not set before reading it.
at gml_Room_rm_00_Create (line 1) - audio_play_sound(room_music, 0, true);
############################################################################################
gml_Room_rm_00_Create (line 1)
 

FoxyOfJungle

Kazan Games
According to the error, he is considering that room_music is a variable, not a sound, and it does not exist. The code is found in the "creation code" event, it is inside the room editor, enter it and find the option, open it and modify it to find the audio.

Another option would be to create an object to manage the songs and make a switch using the room variable and play a song according to each room.
 
According to the error, he is considering that room_music is a variable, not a sound, and it does not exist. The code is found in the "creation code" event, it is inside the room editor, enter it and find the option, open it and modify it to find the audio.

Another option would be to create an object to manage the songs and make a switch using the room variable and play a song according to each room.
I think I kind of understand. Do you have an example of how that would work? I created a new object for music and put the code in various events, the game loaded but the music didn't play.
 
Top