The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Error unexpected end of file! Please help
hiippari Offline
Junior Member

Posts: 31
Threads: 4
Joined: Mar 2012
Reputation: 1
#1
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()
{

}
04-06-2012, 10:52 AM
Find


Messages In This Thread
Script Error unexpected end of file! Please help - by hiippari - 04-06-2012, 10:52 AM



Users browsing this thread: 1 Guest(s)