Unexpected end of file (LucasArts template)

Started by Bryan_abos, Mon 30/10/2017 14:26:33

Previous topic - Next topic

Bryan_abos

hi guys, i'm trying to put this function to an object.
Code: ags

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.

Crimson Wizard

You have mistake in last line:

Code: ags

 player.Say("Que suerte, una de $500); // the closing " is missing


SMF spam blocked by CleanTalk