Unexpected eof

Started by metalmario991, Thu 22/01/2015 23:59:36

Previous topic - Next topic

metalmario991

// room script file

function hManor_Interact()
{
cEgo.Say("I can't do that!");
}

function hManor_Look()
{
cEgo.Say("It's the old Dia Manor!");
}

function hManor_PickUp()
{
cEgo.Say("I can't pick that up!";
}


I entered this for my room script and got an error saying unexpected eof. What does that mean and what did I script incorrectly?

Matti

You forgot a bracket:

cEgo.Say("I can't pick that up!");


Cassiebsg

Quote from: metalmario991 on Thu 22/01/2015 23:59:36
and got an error saying unexpected eof. What does that mean and what did I script incorrectly?

eof = end of function (I'm guessing).

Just so you know what it means, since you did ask and you probably will see this error many many times in the future. ;)
With time you'll learn all those error msg, and know what to look for when you see them.
There are those who believe that life here began out there...

monkey0506

I believe it is actually just referring to end of file. With a missing closing parenthesis like that, the parser is consuming the rest of the script file looking for another parenthesis. It might be possible to catch this earlier on (e.g., if it encounters a closing curly brace before it finds the matching parenthesis). I'm not sure if there's already an issue in the tracker for that or not, but there probably should be.

SMF spam blocked by CleanTalk