GameMaker: Studio

GameMaker: Studio

Vezi statistici:
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
< >
Se afișează 1-2 din 2 comentarii
There needs to be a space between the if and room_exist. Otherwise it sees it as one big command which doesn't exist.
Editat ultima dată de Dance1211; 8 mai 2013 la 14:22
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.
< >
Se afișează 1-2 din 2 comentarii
Per pagină: 1530 50

Data postării: 8 mai 2013 la 12:19
Postări: 2