Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: SmugMonster on Fri 13/04/2018 23:44:48

Title: Unexpected end of file error when saving a room
Post by: SmugMonster on Fri 13/04/2018 23:44:48
Howdy! I'm poking around with AGS, my team is thinking of using this for our upcoming project, and I ran into an error when messing about with basic functions. Here's the room code:

Code (ags) Select
// room script file

function CeilingHole_AnyClick()
{
player.Say("There's a hole in the ceiling. Great.";
}

function oBlueCup_AnyClick()
{
player.Say("This cup seems random as all hell.");
player.AddInventory(iBlueCup);
oBlueCup.Visible = false;
}


When I hit Save, it throws an Unexpected End of File error on line 14 (note that there are only 13 lines in this code...) In reading up on this, it's generally a missed bracket or quotation mark that causes these, I found... but either my brain is fizzled and I'm missing a clearly obvious error (always possible!) or something's wonky, 'cause I'd swear that code looks good... halp?
Title: Re: Unexpected end of file error when saving a room
Post by: morganw on Fri 13/04/2018 23:53:04
Quote from: SmugMonster on Fri 13/04/2018 23:44:48
Code (ags) Select
player.Say("There's a hole in the ceiling. Great.";
You are missing a closing bracket.
Title: Re: Unexpected end of file error when saving a room
Post by: SmugMonster on Sat 14/04/2018 00:08:40
Huh. So I was. I distinctly remember putting one there... ah well, thanks, I'm clearly fizzled for the night lol