Sir.Rocket 18 Apr, 2013 @ 2:00am
Game maker coding
Now I know it's not source coding, but thought maybe they share some similaritys. I'm in no way a coder so maybe they use different language, so please forgive me if this is pointless. Hey maybe some code heads could help me.

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-7 of 7 comments
For one, gamemaker's not that similar to C++ or anything, it's good to get you on the right track but you can't do an immediate transaction. A seasoned C++ programmer without knowledge in gml would probably only help you with the concepts and maybe basic syntax.

For two, if memory serves the issue you're getting is something involving an invalid variable or function in the outside room event of the object leroy, and it's either I've lost some skills in gml or we'd need to see some of the code. Really wish I could be of more help but there isn't much to go off of.

For three, it'd probably be best to use the official gamemaker forums here http://gmc.yoyogames.com/ next time.
Sir.Rocket 22 Apr, 2013 @ 9:02am 
Just tell me what code you need and I'll copy and paste it. x
Alright, first, I may be able to help a bit more. Looking into the gml docs, I can tell you right now that ifroom_exists is bad syntax and would give you an error, even if you just mistyped. What you'd need to use would be; "if (room_exists (the room you need to check for))" without the quotes.

If that doesn't work though, then you'll need to go over these. I can tell that something's supposed to happen when obj_leroy leaves the room, is it to advance to the next room or to reset him back to the start or what? Should another object be in the way and stop him from leaving the room, and that's doing nothing, or that he'll still interact with that object but sometimes that doesn't work? When exactly does this error occur? As for the actual code, just copy and paste what's in obj_leroy in the outside room event, and if absolutely necessary just try to find a better error-free way of doing the same thing if possible.
Sir.Rocket 22 Apr, 2013 @ 1:20pm 
He should walk into the other room and be spawned there. What I've done is:

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

and clicked persistant.
If I'm understanding what's written, the issue is that room2 isn't a coordinate. If all you're trying to do is go to the next room without any crazy dynamic stuff, then all you'd need is the "go to next room" thing on the "outside room" event and make sure that in the new next room obj_leroy's at whatever coordinates you want him to be.
Smallz 30 May, 2013 @ 11:59am 
badger
< >
Showing 1-7 of 7 comments
Per page: 1530 50