Help! "Runtime Error: unexpected eof" [SOLVED]

Started by teenage_musings, Fri 30/05/2008 14:09:14

Previous topic - Next topic

teenage_musings

I pressed F5 to save my game and open it so I could test it when I got;

"Runtime error: unexpected eof"
"File: GlobalScript.asc"
"Line: -10"

What does it mean by -10? If I double click it, all it does is take me to the first line which is highlighted. And the first line just says "//main global script file"

Is anybody able to help please?
[also, it would be nice if someone could tell me what eof means]

Khris

eof means "end of file"; check the script for a missing closing bracket: }

teenage_musings

thank you!
I found it XD just goes to show how  careful you have to be in AGS, I forgot 1 bracket and it screwed my whole game up ><"

Jakerpot

yeah, i got the same problem, but i didn't located that bracket...

EDIT: "paperish"!" was the problem LoL

Code: ags

// room script file

function hHotspot1_Interact()
{
int RandomInteract=Random(2);
if (RandomInteract==0)
  dRandomInteract1.Start();
if (RandomInteract==1) 
  dRandomInteract2.Start();
else
  dRandomInteract3.Start();
}

function hHotspot1_Look()
{
 cCharacter.Say("Something is wrote on the display bar: Put the 6 digits code to open.");
}

function hHotspot1_PickUp()
{
 cCharacter.Say("How can i pick that safe?");
}

function hHotspot1_Talk()
{
 cCharacter.Say("I can't do that.");
}

function hHotspot1_UseInv()
{
 cCharacter.Say("I need a password, not this!");
}

function hHotspot2_Interact()
{
 cCharacter.Say("I cant go back there.");
}

function hHotspot2_Look()
{
 cCharacter.Say("Its the door i unlocked using my sabedory, skills and...");
 cCharacter.Say("And...");
 cCharacter.Say("Some help from you, of course.");
}

function hHotspot2_PickUp()
{
cCharacter.Say("I cant put a door on my inventory.");
}

function hHotspot2_Talk()
{
 cCharacter.Say("If doors could talk, we could try to force it to say where the key is.");
 cCharacter.Say("But no, they dont talk, so we have to find the key by us own.");
 cCharacter.Say("Damn scientists that doesn't created a talking door yet!");
}

function hHotspot2_UseInv()
{
 cCharacter.Say("No, using anything on everything will not solve the puzzle, try thinking.");
}

function hHotspot3_Interact()
{
 cCharacter.Say("No.");
}

function hHotspot3_Look()
{
 cCharacter.Say("A normal table.");
}

function hHotspot3_PickUp()
{
 cCharacter.Say("We are not playing Katamari you jerk!");
}

function hHotspot3_Talk()
{
 cCharacter.Say("Just table's understand the Table Language.");
}

function hHotspot3_UseInv()
{
cCharacter.Say("Im laughing out loud for you.");
}

function room_FirstLoad()
{
 dComputer2.Start();
}

function hHotspot4_Interact()
{
 cCharacter.Say("I will not touch on that!");
}

function hHotspot4_Look()
{
 cCharacter.Say("Its a bunch of papers with graphics on it.");
}

function hHotspot4_PickUp()
{
 cCharacter.Say("I can't, they are glued on the floor.");
 cCharacter.Say("If i force it will rip.");
}

function hHotspot4_Talk()
{
 cCharacter.Say("I dont talk "paperinsh"!");
}





Rentin

I got the same error yesterday from forgetting a single closing quotation, was such a pain to figure it out and look through it all. geeeeeeez.
I've got FIVE death cards... That can't be good...

Matti

Quote from: teenage_musings on Sat 31/05/2008 12:01:26
thank you!
I found it XD just goes to show how  careful you have to be in AGS, I forgot 1 bracket and it screwed my whole game up ><"

This has nothing to do with AGS but rather with programming in general.

SMF spam blocked by CleanTalk