Function still open problem

Started by rock_chick, Sat 05/04/2008 18:48:16

Previous topic - Next topic

rock_chick

One of my room scripts is showing this error and upon checking my code I don't understand what to do to fix it.



Code: ags
// 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);
}

TwinMoon

Code: ags

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.

rock_chick

Quote from: TwinMoon on Sat 05/04/2008 18:52:57
Code: ags

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?

TwinMoon

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.

SMF spam blocked by CleanTalk