This is embarrassing but I'm getting a fatal error when launching my map and I don't know what's wrong. I've looked through my script (and the forums) a million times but can't find any solutions. It worked fine but then I added something that gave me an error so I deleted it and now my map won't load at all.
FATAL ERROR: Could not load script file 'custom_stories/tatthi/maps/terrorica.hps'! main (36, 1) : ERR : Expected ';'
My script:
void OnStart()
{
AddUseItemCallback("", "basement_key_1", "lockeddoor_1", "KeyOnDoor", true);
SetEntityCallbackFunc("basement_key_1", "OnPickup");
AddEntityCollideCallback("Player", "ScriptArea_1", "scare_2", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "FlyingBody", true, 1);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("lockeddoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "lockeddoor_1", 0, false);
RemoveItem("basement_key_1");
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("corpse_1", true);
AddTimer("Scare", 0.25f, "Scare1");
PlaySoundAtEntity("", "21_screams.snt", "corpse_1", 0, false);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
}
void Scare1(string &in asTimer)
{
GiveSanityDamage(10, true);
}
void scare_2(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("lockeddoor_1", true, true);
PlaySoundAtEntity("", "21_bang_door", "lockeddoor_1", 0, false);
AddTimer("timer2", 0.25f, "Scare2");
SetEntityActive("hanging_prisoner_1", true);
PlaySound
}
void Scare2(string &in asTimer)
{
GiveSanityDamage(5, true);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
}
void FlyingBody(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("corpse_male_1", true);
PlaySoundAtEntity("", "21_screams.snt", "corpse_male_1", 0, false);
AddPropForce("corpse_male_1", 5000, 0, 0, "");
AddTimer("timer3", 0.25f, "scare3");
}
void scare3(string &in asTimer)
{
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
GiveSanityDamage(10, true);
}