Amnesia Custom Story Error
Hi, I've got a problem, if I enter my room, which I have created, there will be an error in the .hps file. The error says: ExecuteString (1,1): ERR : No matching signaturest to 'OnLeave()' (102,5): ERR : Unexpected end of file
Here is my script:
void OnStart()
{
SetEntityPlayerInteractCallback("door1", "func_slam", true);
}
void func_slam(string &in asEntity)
{
SetPropHealth("door1", 0.0f);
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);
}
void OnEnter()
{
AddUseItemCallback("", "archive1", "door4", "FUNCTION", true);
AddEntityCollideCallback("Player", "script1", "HolyJesus", true, 1);
AddEntityCollideCallback("Jesus_1", "script1", "Sound", true, 1);
AddUseItemCallback("", "archive1", "door4", "UsedKeyOnDoor", true);
SetEntityCallbackFunc("archive1", "OnPickup");
SetLocalVarInt("Var1", 0);
SetEntityPlayerInteractCallback("lever1", "func1", true);
}
void func1(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
Hebel1 ();
void Hebel1
{
if(GetLocalVarInt("Var1") == 1)
{
SetSwingDoorLocked("bonus1", false, false);
PlaySoundAtEntity("", "unlock_door.snt", "bonus1", 0.5f, false);
GetPlayerSanity(2.0f, true);
}
}
void HolyJesus(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus_1", true);
AddPropForce("Jesus_1", 30000, 0, 0, "World");
}
void Sound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "24_iron_maiden.snt", "script1", 0, false);
GiveSanityDamage(7.0f, true);
}
void FUNCTION (string &in item, string &in door)
{
SetSwingDoorLocked(door, false, true);
PlaySoundAtEntity("", "unlock_door", door, 0, false);
RemoveItem(item);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door4", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "door4", 0, false);
RemoveItem("archive1");
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("grunt1", true);
AddEnemyPatrolNode("grunt1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_5", 3, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_8", 5, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_10", 4, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_11", 5, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_14", 7, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_15", 3, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_17", 3, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("grunt1", "PathNodeArea_20", 0, "");
}
void OnLeave()
{
}
What have I done wrong? Please help me ;(
|