GMS 2 Error going from Naming character screen to next room

I have a game I'm working on called "The Fountains". I have no experience in coding games and basically grabbed an outdated (GM 1.4) off a website. I imported it into GM2

The start screen works fine and plays title music as well as the new game screen.
When you select a new game it takes you to a naming screen. This also works fine and plays appropriate music.

But when you select OK to start the game it reverts to a black screen with title music playing again.

Heres a video of the problem


The rooms are in this order.

rmInit
rmMenu
rmControls
rmSoundTest
rmNewGame
rmNaming
rmExample (This is the room I want to send the player to after the Naming Screen/Save start

I've checked through the code and maybe it can be of help.

play_music.gml

GML:
/// @description play_music(sound_id,pitch)
/// @param sound_id
/// @param pitch
function play_music(argument0, argument1) {

    if argument0 == -1 or global.mute {
        audio_stop_all()
    } else {
        if argument0 != global.bgMusic {
            global.bgMusic = argument0
            audio_stop_all()
            global.bgMusic_ = audio_play_sound(global.bgMusic,0,1)
            audio_sound_pitch(global.bgMusic_,argument1)
        }
    }



}
Code:
/// @description Insert description here
// You can write your code in this editor

if room = rmNaming {
    audio_stop_all()
    audio_play_sound(bgmYourNamePlease,1,true)
}
if room = rmExample1 {
    audio_stop_all()
    audio_play_sound(bgmTrouble,1,true)
 }
if room = rmExample {
    audio_stop_all()
    audio_play_sound(bgmTrouble,1,true)
 }
 
if room = rmGrass {
    audio_stop_all()
    audio_play_sound(bgmTrouble,1,true)
 }
Thanks!
 

Gamebot

Member
I do see an error in your code: line 8 ( above there is a one after your rmExample ) you typed rmExample1 not rmExample. Unless you meant a different room?
 
rmExample1 was on there so I got rid of that. Fixed the code and it's still bringing to a blank room with the theme music playing.
 
Top