Script Error
I have this error:
ExcecuteString(1,1):ERR:No matching signatures to 'OnEnter'
ExcecuteString(1,1):ERR:No matching signatures to 'OnLeave'
Main(108,1):ERR:Unexpected end of file
What's wrong? Here is complete script:
// This runs when the map first starts=================
void OnStart()
{
AddEntityCollideCallback("Player", "advice", "startadvice", true, 1);
AddEntityCollideCallback("Player", "stopamb", "silence", true, 1);
AddEntityCollideCallback("Player", "afteroil", "afteroilscare", true, 1);
AddEntityCollideCallback("Player", "jebac", "jeebac", true, 1);
AddEntityCollideCallback("Player", "ciach", "gameover1", true, 1);
AddEntityCollideCallback("Player", "ciach_1", "gameover1", true, 1);
AddEntityCollideCallback("Player", "maze2", "saw", true, 1);
AddEntityCollideCallback("Player", "schiza", "startschiza", true, 1);
AddEntityCollideCallback("Player", "baby", "babycry", true, 1);
AddEntityCollideCallback("Player", "maze1", "scary1", true, 1);
AddEntityCollideCallback("Player", "swinie", "swiniescary", true, 1);
AddUseItemCallback("", "exitkey", "exitdoor", "exitunlock", true);
AddUseItemCallback("", "beforekey", "beforedoor", "beforeunlock", true);
SetEntityCallbackFunc("potion_oil_large_5", "OnPickup");
}
void gameover1(string &in asParent, string &in asChild, int alState)
{
GivePlayerDamage(25, Slash, true, false);
)
void silence(string &in asParent, string &in asChild, int alState)
{
StopMusic(0, 5);
)
void gameover2(string &in asParent, string &in asChild, int alState)
{
GivePlayerDamage(25, Slash, true, false);
)
void afteroilscare(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("corpse_male_3", true);
AddPropForce("corpse_male_3, 10000, 0, 0, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false);
}
void startadvice(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "lastivo.snt", "Player", 0, false);
AddTimer("", 47, "openlast");
}
void startschiza(string &in asParent, string &in asChild, int alState)
{
PlayMusic("auditory.ogg", true, 1, 0, 5, false);
}
void babycry(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "insanity_baby_cry.snt", "Player", 0, false);
}
void saw(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "23_saw_voice2.snt", "Player", 0, false);
}
void openlast(string &in asTimer)
{
SetEntityActive("prison_1", false);
SetEntityActive("prison_2", true);
PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false);
}
void scary1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("corpse_male_2", true);
PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false);
}
void jeebac(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("swinie", true);
}
void swiniescary(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("prosie", true);
PlaySoundAtEntity("", "jebacswinie.snt", "Player", 0, false);
}
void exitunlock(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("exitdoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}
void beforeunlock(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("beforedoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("afteroil", true);
)
|