Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: dbuske on Sat 11/05/2013 17:32:47

Title: room load error
Post by: dbuske on Sat 11/05/2013 17:32:47
I am working on a 1st person escape horror game.
The only character is set to not be shown.
The game crashes when trying to move to room 2
The error message is:
"Error load room: Unable to load file room 350.cm (does not exist)
Check the player character's start room is correct."
It is.
Thanks for any help.
Title: Re: room load error
Post by: Slasher on Sat 11/05/2013 17:57:49
If room 350 does not exist then how can you go there?

If your main player is set in it's event panel to start in room one then it should start there and when changing to room 2 it should go to room 2, if room 2 exists.

The figure 350 must come from somewhere as it is referenced.

Apart from that...

Title: Re: room load error
Post by: Khris on Sat 11/05/2013 18:12:37
Looks like you mixed up the order of the parameters in your player.ChangeRoom() call at the end of room 1.

You probably have
Code (ags) Select
  player.ChangeRoom(350, some y, 2);

It's supposed to be
Code (ags) Select
  player.ChangeRoom(2, 350, some y);
Title: Re: room load error
Post by: dbuske on Sat 11/05/2013 18:43:48
Quote from: Khris on Sat 11/05/2013 18:12:37
Looks like you mixed up the order of the parameters in your player.ChangeRoom() call at the end of room 1.

You probably have
Code (ags) Select
  player.ChangeRoom(350, some y, 2);

It's supposed to be
Code (ags) Select
  player.ChangeRoom(2, 350, some y);

Thanks Khris, you were right. It works now