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.
Hello. When I try to open my custom map i get an error telling me Unexpected end of file. I have 2 maps and i have no problem opening the other. And the script looks pretty much the same.
The script look like this. Anyone can help me with this? So I dont get any more errors
Thanks in advance


void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_15", "ActivateMonster1", false, 0);
}

void ActivateMonster1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("waterlurker_2", true);
}

void OnEnter()
{
AddEntityCollideCallback("Player", "pooarea", "func_slam", true, 1);
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_1", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetPlayerActive(false);
StartPlayerLookAt("mansion_1", 3.0f, 5.0f, "");
AddTimer("timer01", 1.5f, "StopLook");

void StopLook(string &in asTimer)
{
StopPlayerLookAt();
SetPlayerActive(true);
}
You need to close your braces in your func_slam function
(02-22-2012, 08:03 PM)palistov Wrote: [ -> ]You need to close your braces in your func_slam function
Oh i found it, thank you