Frictional Games Forum (read-only)

Full Version: Unexpected end of file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I get the error saying that there is an unexpected end to my file. Could someone point out my error, I cannot find it.


/////////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "DoorAreaOne", "CollideDoorOne", true, 1);
}

void CollideDoorOne(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("cellar_wood01_slow_1", true, true);
}
////////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "DoorKey, "castle_arched01_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_arched01_1", false, true);
PlaySoundAtEntity("", "unlock_door", "castle_arched01_1", 0, false);
RemoveItem("DoorKey");
}

////////////////////////////////
// Run when leaving map
void OnLeave()
{

}
In your OnEnter() function, you forgot to close DoorKey with a quotation mark.

It should look like:

AddUseItemCallback("", "DoorKey", "castle_arched01_1", "UsedKeyOnDoor", true);

It's always the little things Smile
(08-11-2011, 03:52 AM)graykin Wrote: [ -> ]In your OnEnter() function, you forgot to close DoorKey with a quotation mark.

It should look like:

AddUseItemCallback("", "DoorKey", "castle_arched01_1", "UsedKeyOnDoor", true);

It's always the little things Smile

And to think I stared at this tiny script for 15 minutes, up and down. Thank you.
No prob. Smile I've made that mistake enough times that I know what to look for.