Problem with character leaving room

Started by supercage82, Sun 16/11/2014 20:45:52

Previous topic - Next topic

supercage82

I have just recently decided to try building something with AGS.

I added script to get my character to move from room 1 to room 2.  As soon as leaves room 1 I get the following error message:

Error: prepare_script: error-18 (no such function in script) trying to run 'room_Leave (Room 1)

What do I do to fix it?

Thanks very much for your help.

Cassiebsg

Well, seems like you created a function(?) called room_Leave (Room 1) that you linked to somewhere, but you don't really have that function name on the script...

Posting your relevant code could probably help us to track down exactly what you did wrong though.
There are those who believe that life here began out there...

supercage82

The script I have in is:

function soulroom1_LeaveTop()
{
  DD.ChangeRoom(2);
}


Gurok

You can do one of two things.

1. Add a new function to the room script of room 1 called room_Leave:
Code: ags
function room_Leave()
{
}


2. Delete the binding for "Leaves room". You can find it in the events tab of the properties pane (click the lightning bolt). Make sure room 1's "Leaves room" is blank, like so:

You can just click in the text field and delete the text that's there to remove the binding.
[img]http://7d4iqnx.gif;rWRLUuw.gi

supercage82

Thanks very much guys.  The game is now working.

SMF spam blocked by CleanTalk