I want to create two different script in my .hps file, but when I running a map, game shows fatal error:
main (12,1): ERR: Unexpected token '{'
main (17,1): ERR: Unexpected token '{'
What's wrong with it? Please, help. Could you explain how to make different scripts and, if you have time, fix those two? (to example how make scripts). Btw, sorry for my (maybe) bad English
Here's a script:
////////////////////////////
// Run when starting map
void OnStart()
{
AddUseItemCallback("", "basementkey_1", "basement_1", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("basement_1", false, true);
PlaySoundAtEntity("", "unlock_door", "basement_1", 0, false);
}
{
AddEntityCollideCallback("Player", "tp_1", "DeadOne", true, 1);
}
void DeadOne(string &in asParent, string &in asChild, int alStates);
{
SetEntityActive("GhostOne", true);
AddPropForce("GhostOne", 0, 0, -10000, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "GhostOne", 0, false);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}