Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Bryan_abos on Mon 30/10/2017 14:26:33

Title: Unexpected end of file (LucasArts template)
Post by: Bryan_abos on Mon 30/10/2017 14:26:33
hi guys, i'm trying to put this function to an object.
Code (ags) Select

function oKina_AnyClick()
{
  player.Walk(101, 99, eBlock);
  player.FaceDirection(eDirectionUp);
  {
    if (UsedAction(eGA_PickUp)){
      oKina.Visible = false;
      player.AddInventory(iKina);
      player.Say("¡Bien! ¡Quinientos pesos!");
    }
    else if (UsedAction(eGA_LookAt)){
      player.Say("Que suerte, una de $500);
    }
  }
}


but every time I paste it into the room scrip (because if I "cut(ctrl+x)" the segment off the script it saves and the game starts), it doesn't let me start the game. the error says:

"room3.asc(59): Error (line 59): Unexpected end of file"

EDIT: let me elaborate on what should happen...

if the character pick up the object, she should say something, add it to the inventory and that object should dessapear.
Title: Re: Unexpected end of file (LucasArts template)
Post by: Crimson Wizard on Mon 30/10/2017 14:36:03
You have mistake in last line:

Code (ags) Select

player.Say("Que suerte, una de $500); // the closing " is missing
Title: Re: Unexpected end of file (LucasArts template)
Post by: Bryan_abos on Mon 30/10/2017 14:40:55
I'm such an asshole xD thanks...