Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - The_Fonz

#1
I am new to the AGS community, and I've been creating a King's Quest styled game, up till a few hours ago it was functioning completely fine. I've been looking through the manual and various tutorials nonstop, But I can't find the solution., I think I might have deleted a line of code on accident.
Everything was fine until I added a second room, I followed this tutorial on YouTube by Densming: https://www.youtube.com/watch?v=eCo0CZzKTPk
I was using regions instead of edges because the door I was trying to use was in an odd area, and there are 4 other doors also. Now when I try to test my game it gives me the "error: prepare_script: error -18(no such function in script) trying to run 'room_afterFadeIn' (Room 1)
This was the code I was using in the first room script for my door.

function region6_WalksOnto()
{
cEgo.ChangeRoom(2);
}

I couldn't get it to work so I deleted it and went back to the manual, I think this is when I deleted the other line, because when I came back to test something else that was previously working I could no longer play the game at all. (game will open and play for about 3 seconds, then is interrupted with the error)

This is the script from my first room, I didn't mess with the Global script during this session.
I don't know how to fix this, I've been staring at it for hours with different forums pulled up and videos, but I don't know what to do. Thank you :(

Code: ags

// room script file

function hDoorRoomOne_Look()
{
Display("The sign above the door says 'Tavern'.");
}

function hDoorTwoRoomOne_Look()
{
Display("The sign above the door says 'Inn'.");
}

function hInnWindowRoomOne_Look()
{
Display("Hmm, Looks like an inn to me.");
}

function hDoorRoomOne_Interact()
{
Display("This must be the Tavern entrance..");
}

function hDoorTwoRoomOne_Interact()
{
Display("The door appears to be locked. Perhaps I should return at a more reasonable time.");
}

function hInnWindowRoomOne_Interact()
{
Display("The room is dark, Looks like everyone is asleep.");
}

function oKey_Interact()
{
player.Walk(230, 184, eBlock);
oKey.Visible = false;
player.AddInventory(iKey);
GiveScore (5);
}

function room_Load()
{
AudioChannel* chan = aMusic1.Play();
chan.Volume = 100;

}
SMF spam blocked by CleanTalk