Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: BlueAngel on Sun 13/12/2009 10:32:34

Title: (Solved) Function still open, error line -10?
Post by: BlueAngel on Sun 13/12/2009 10:32:34
Runtime error: Function still open, missing } (File: room3.acs/Line: -10)

Please can someone look at my code? Im missing a } somewhere but I cant find it. :-[


// room script file

bool doorlocked = true;

int myCounter;

function room_LeaveBottom()
{
 cOskar.ChangeRoom(4, 289, 347);
}

function room_LeaveLeft()
{
 cOskar.ChangeRoom(2, 690, 410);
}

function hTv_Look()
{
 cOskar.Say("I dont have time to look at the tv now, I got work to do!");
}

function hTv_Talk()
{
 cOskar.Say("My mum says the people on the telly isnt real so there is no point in asking them for help.");
}

function hCouch_Look()
{
 cOskar.Walk(416, 389, eBlock, eWalkableAreas);
 if (myCounter == 0)
 {
   cOskar.Say("Dad sleeps on it sometimes after dinner");
 }
 if (myCounter == 1)
 {
   cOskar.Say("Sometimes you can find stuff in it, like loose change and things");
 }
 if (myCounter <2)
 {
   myCounter +=1;
 }
}

function hCouch_Interact()
{
 cOskar.Walk(416, 389, eBlock, eWalkableAreas);
 if (myCounter == 3)
 {
   cOskar.Say("Under that pillow I only found the remote");
 }
 if (myCounter == 4)
 {
   cOskar.Say("Wow a empty cd! Good now I got something to put the game on");
   player.AddInventory(iCd);
   GiveScore(5);
 }
 if (myCounter == 5)
 {
   cOskar.Say("There is nothing else useful there");
 }
 if (myCounter <6)
 {
   myCounter +=1;
 }
}

function hDoorSisters_Look()
{
 cOskar.Say("Thats the door to my sisters room");
}

function room_AfterFadeIn()
{
   RemoveWalkableArea (2);
}

function hDoorSisters_Interact()
{
 cOskar.Say("I cant walk in there without a present, now can I!");
}

function hDoorSisters_Talk()
{
 cOskar.Say("Coming soon Sis! Just got somemore this to do");
 cSister.Say("Hurry up will you! I want my present!");
}


function hDoorSisters_UseInv()
{
 if (cOskar.ActiveInventory == iGift) {
   doorlocked = false;
   oOpendoor_sister.Visible = true;
   cOskar.Say("Party, here I come!");
   GiveScore (5);
   RestoreWalkableArea (2);
   player.ChangeRoom(5);
}
[\code]
Title: Re: Function still open, error line -10?
Post by: NsMn on Sun 13/12/2009 10:34:08
It's right at the end.
Title: Re: Function still open, error line -10?
Post by: BlueAngel on Sun 13/12/2009 10:35:47
Thanks, I looked it all over - must be going blind! ;D