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

I need help!

M

M36games

Guest
I am making a game but the game gets an error every time I compile it!
Here is what I put in it:

if keyboard_string = "THREE"{
room_goto = 3;
}

I am trying to make it so when I type that it goes to that room. But I get this message when I compile it:

Error: gml_Object_obj_entername_KeyPressed_SHIFT_1(92) : cannot use function/script name for a variable, using "room_goto"
 
T

TonyCold

Guest
Well, You can use that:
Make a variable called Answer and set it: Answer = get_string("Enter the number of the room","")
if Answer = "THREE" {
room_goto(Name of the third room)
}
Your problem is that you put "=" after room_goto however it works like that --> room_goto(Name of rooù)
 
M

M36games

Guest
Well, You can use that:
Make a variable called Answer and set it: Answer = get_string("Enter the number of the room","")
if Answer = "THREE" {
room_goto(Name of the third room)
}
Your problem is that you put "=" after room_goto however it works like that --> room_goto(Name of rooù)
TYSM!!!
 
Top