Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Rocky_Johan on Fri 09/07/2021 19:48:44

Title: [SOLVED] Can't enter second room
Post by: Rocky_Johan on Fri 09/07/2021 19:48:44
So i'm trying to get my character from room 1 to room 2 following the manual and tutorial videos.
Everything works untill i leave room 1 and the game crashes with this error message:

"error: prepare_script: error -18(no such function in script)
trying to run ´room load´ (room 2)"

What does this mean and how do i fix it?

My code leaving the room looks like this:

function room_LeaveTop()
{
cEgo.ChangeRoom(2,  502,  448);
}


Thanks!
Title: Re: Can't enter second room
Post by: Slasher on Fri 09/07/2021 21:01:54
Did you use the 'Enters room before fade in' function in Room 2 events panel or did you just type it in?

Title: Re: Can't enter second room
Post by: Cassiebsg on Sat 10/07/2021 00:38:06
That sounds likes you have clicked an event, that you called room load, and then you either deleted it from script or changed it's name to something else. load[/b].
Title: Re: Can't enter second room
Post by: Rocky_Johan on Sat 10/07/2021 05:39:08
Quote from: Cassiebsg on Sat 10/07/2021 00:38:06
That sounds likes you have clicked an event, that you called room load, and then you either deleted it from script or changed it's name to something else. load[/b].

Yes this was indeed the problem.
Thanks!