Script Error unexpected end of file! Please help
So i get this error when i try to go in my map : Error: ........Cant open The Prison 2.map Unexpected end of file 125,2
Here is my script. Please help, thanks
void OnStart()
{
SetLocalVarInt("Var1", 0);
AddEntityCollideCallback("Player", "explode_scare", "Explode", true, 1);
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddUseItemCallback("", "key_1", "door_3", "UsedKeyOnDoor", true);
AddUseItemCallback("", "needle_1", "door_4", "Needle", true);
AddUseItemCallback("bottleEcon", "glass_container_1", "acid_container_1", "UseBottle", true);
AddUseItemCallback("bottleFcon", "glass_container_filled", "acid_container_1", "UseBottle", false);
AddUseItemCallback("AcidOnDoor", "glass_container_filled", "AcidDoor", "UseAcidDoor", true);
}
void Explode(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("pot_explode", 0);
GiveSanityDamage(20.0f, true);
}
void func1(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func4();
}
void func2(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func4();
}
void func3(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func4();
}
void func4()
{
if(GetLocalVarInt("Var1") == 3)
{
/////add what ever you want to happen after you press all 3 buttons here.
SetSwingDoorLocked("door1", false, false);
PlaySoundAtEntity("", "unlock_door.snt", "door1", 0.5f, false);
}
}
void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door_1", true, true);
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(10.0f, true);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("brute_1", true);
ShowEnemyPlayerPosition("brute_1");
AddEnemyPatrolNode("brute_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("brute_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("brute_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("brute_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("brute_1", "PathNodeArea_6", 0, "");
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_3", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "door_3", 0, false);
RemoveItem("key_3");
}
void Needle(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_4", false, true);
PlaySoundAtEntity("", "unlock_door", "door_4", 0, false);
RemoveItem("needle_1");
}
void UseBottle(string &in asItem, string &in asEntity)
{
if(asItem == "glass_container_1")
PlaySoundAtEntity("fillbottle", "puzzle_acid_success", asEntity, 1.0f, false);
RemoveItem(asItem);
GiveItemFromFile("glass_container_filled", "glass_container_filled.ent");
GiveSanityBoostSmall();
}
void UseAcidDoor (string &in asItem, string &in asEntity)
{
if(asItem == "glass_container_filled")
{
PlaySoundAtEntity("burnlock", "puzzle_acid", "AcidDoor", 1.0f, false);
CreateParticleSystemAtEntityExt("AcidSteam","ps_steam_puff","AcidDoor", false, 0.0f, 0.35f, 0.0f, 1.0f, false, 10, 10, 10, 10);
CreateParticleSystemAtEntity("AcidBubbles","ps_acid_container_bubbles","AcidDoor", false);
SetSwingDoorLocked("AcidDoor", false, false);
CompleteQuest("AcidLock", "AcidLock");
GiveSanityBoost();
RemoveItem("glass_container_filled");
}
void TimerPartKill(string &in asTimer)
{
DestroyParticleSystem("AcidBubbles");
DestroyParticleSystem("AcidSteam");
}
void OnLeave()
{
}
|