07-07-2012, 09:01 PM
I get a fatal error when loading a map. It says
"main (19, 1) :ERR : Unexpected Token '}'
This is how my script looks like:
"main (19, 1) :ERR : Unexpected Token '}'
This is how my script looks like:
Quote:////////////////////////////I've sincerely no idea where the error might be, since i directly copied the script from a tutorial at the wiki.
// Run when the map starts
void OnStart()
{
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
}
void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door2", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}