Sir.Rocket May 8, 2013 @ 12:19pm
Gamemaker coding please help!
I'm currently making a game for college using Game maker and to achieve top marks coding must be implemented. Now this error pops up everytime I walk into the next room. In more detail my game is a 2D platformer so it holds multiply rooms and when I walk into the next room on the first level this pops up.

__________________________________________________
FATAL ERROR in
action number 1
of Other Event: Outside Room
for object obj_leroy:

Push :: Execution Error - Variable Get 9.east(100008, 0)
at gml_Object_obj_leroy_Other_0 (line_19-ifroom_exists(obj_location.east)
___________________________________________________

If more detail is required to find out why, please inform me.

Thank you for you time

-Sir.Rocket x
Showing 1-2 of 2 comments
< >
Dance1211 May 8, 2013 @ 2:21pm 
There needs to be a space between the if and room_exist. Otherwise it sees it as one big command which doesn't exist.
Last edited by Dance1211; May 8, 2013 @ 2:22pm
Sir.Rocket May 9, 2013 @ 1:27am 
In the actual coding there is a space, I don't know why it's shown it like that there. This is the code I've used on my sprite:

if y-8 > room_height
{
if room_exists(obj_location.south)
{
room_goto(obj_location.south)
y = 0+8
}
}
if y-8 < 0
{
if room_exists(obj_location.north)
{
room_goto(obj_location.north)
y = room_height-8
}
}
if x+8 > room_width
{
if room_exists(obj_location.east)
{
room_goto(obj_location.east)
x = 0+8
}
}
if x-8 < 0
{
if room_exists(obj_location.west)
{
room_goto(obj_location.west)
x = room_width-8
}
}

I created an 'outside room' event and placed this code in it. Also I've added coding to the rooms which is the follow:

location = instance_create(0,0,obj_location)
with (location)
{
north = -1
south = -1
east = room2
west = -1
}

I've ticked Persistent.
Showing 1-2 of 2 comments
< >
Per page: 15 30 50
Date Posted: May 8, 2013 @ 12:19pm
Posts: 2