One of my room scripts is showing this error and upon checking my code I don't understand what to do to fix it.
(http://img291.imageshack.us/img291/3589/functionerrortb4.png) (http://imageshack.us)
// room script file
function painting_Look()
{
character[0].FaceLocation(0, 0);
DisplayMessage(3);
}
function Notepad_Look()
{
DisplayMessage(11);
}
function windows_Look()
{
DisplayMessage(5);
if (Game.DoOnceOnly("bedroom windows"))
{
ShowScore(1);
}
}
function Notepad_PickUp()
{
DisplayMessage(12);
if (Game.DoOnceOnly("take first page of notepad"))
{
ShowScore(4);
}
}
function paper_Look()
{
DisplayMessage(0);
if (Game.DoOnceOnly("player name"))
{
ShowScore(2);
}
function paper_Look()
{
DisplayMessage(0);
if (Game.DoOnceOnly("player name"))
{
ShowScore(2);
}
}
You're missing one } there, behind ShowScore(2);
Hey, the error message says line -10? That looks like a bug.
Quote from: TwinMoon on Sat 05/04/2008 18:52:57
function paper_Look()
{
DisplayMessage(0);
if (Game.DoOnceOnly("player name"))
{
ShowScore(2);
}
}
You're missing one } there, behind ShowScore(2);
Hey, the error message says line -10? That looks like a bug.
Thanks, that fixed it up. Do you think I should report the -10 thing as a bug?
Quote from: rock_chick on Sat 05/04/2008 19:05:54
Thanks, that fixed it up. Do you think I should report the -10 thing as a bug?
Well, it seems that this error message ( Function still open; missing } ) always says it's line -10, because AGS doesn't know which line you have to fix.
It's not a real bug, but you could post it as a bug in the technical forum, because it's an odd message.