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 Help Unexpected end to file
Southlaguna Offline
Member

Posts: 70
Threads: 21
Joined: Jan 2012
Reputation: 0
#13
RE: Unexpected end to file


This is my new HPS after the additions i still get the same error in the exact same spot it says it was before, 224, 1 which is the final bracket. after i adjusted this i copied a blank hps from the storypack to see if theres something else wrong here and i got the same error. there is nothing wrong with the standard script so there is something else wrong here.

////////////////////////////
// Run when entering map
void OnStart()
{
AddUseItemCallback("", "doorkey_1", "locked_door", "UnlockDoor", true);
AddEntityCollideCallback("Player", "onlight", "OnLightActivate", true, 1);
SetEntityPlayerInteractCallback("lantern_1", "OnPickup", true);
AddEntityCollideCallback("Player", "Time", "ActivateSequence", true, 1);
}
void UnlockDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("locked_door", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "locked_door", 0, false);
RemoveItem("doorkey_1");
}
void OnPickup(string &in asEntity)
{
SetEntityPlayerInteractCallback("latern_1", "Music", true);
PlayMusic("01_puzzle_passage.ogg", false, 3, 2, 1, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
SetEntityPlayerLookAtCallback("swing_door_1", "SwingDoor", true);
}
void SwingDoor(string &in asEntity, int alState)
{
SetSwingDoorDisableAutoClose("swing_door_1", true);
SetSwingDoorClosed("swing_door_1", false, true);
AddPropForce("swing_door_1", 0, 0, 2000, "world");
CreateParticleSystemAtEntity("", "ps_dust_whirl.ps", "swing_door_1", false);
PlaySoundAtEntity("", "general_wind_whirl.snt", "swing_door_1", 0, false);
PlaySoundAtEntity("", "door_mansion_open.snt", "Player", 0, false);
}
void ActivateSequence(string &in asParent, string &in asChild, int alState)
{
AddTimer("T8", 0, "Scare_1");
AddTimer("T9", 1, "Scare_1");
AddTimer("T10", 5, "Scare_1");
AddTimer("T11", 9, "Scare_1");
AddTimer("T12", 7, "Scare_1");
AddTimer("T13", 11, "Scare_1");
AddTimer("T14", 13, "Scare_1");
AddEntityCollideCallback("Player", "Area_1", "ScareShitless", true, 1);
AddEntityCollideCallback("Player", "Area_2", "ScareShitless", true, 1);
AddEntityCollideCallback("Player", "Area_3", "HolyShit", true, 1);
AddEntityCollideCallback("Player", "Area_4", "HolyShit", true, 1);
AddEntityCollideCallback("Player", "Area_5", "HolyShit", true, 1);
}
void Scare_1(string &in asTimer)
{
string x = asTimer;
if (x == "T8")
{
SetLampLit("shrine_candle_2", true, true);
SetLampLit("shrine_candle_1", true, true);
SetPlayerMoveSpeedMul(0.3);
StartPlayerLookAt("LookAt", 2, 2, "");
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
FadePlayerFOVMulTo(0.5, 1.5);
StopMusic(1, 1);
}
else if (x == "T9")
{
PlayMusic("15_the_big_scream3.ogg", false, 4, 1, 0, true);
StopPlayerLookAt();
FadePlayerFOVMulTo(1, 1.5);
}
else if (x == "T10")
{
StartPlayerLookAt("LookAt_2", 2, 2, "");
}
else if (x == "T12")
{
StopPlayerLookAt();
PlaySoundAtEntity("", "scare_wood_creak_walk.snt", "creak", 0, false);
}
else if (x == "T11")
{
SetEntityActive("brute_1", true);
PlaySoundAtEntity("", "24_iron_maiden.snt", "brute_1", 0, false);
PlaySoundAtEntity("", "24_iron_maiden.snt", "brute_1", 0, false);
StartPlayerLookAt("brute_1", 4, 4, "");
ShowEnemyPlayerPosition("brute_1");
}
else if (x == "T13")
{
SetPlayerMoveSpeedMul(1);
}
else if (x == "T14")
{
FadeEnemyToSmoke("brute_1", true);
StopPlayerLookAt();
}
}
void ScaredShitless(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("brute_2", true);
PlaySoundAtEntity("", "24_iron_maiden.snt", "brute_2", 0, false);
PlaySoundAtEntity("", "24_iron_maiden.snt", "brute_2", 0, false);
ShowEnemyPlayerPosition("brute_2");
AddTimer("T15", 1, "Scare_2");
AddTimer("T16", 5, "Scare_2");
}
void Scare_2(string &in asTimer)
{
string x = asTimer;
if (x == "T15")
{
StartPlayerLookAt("brute_2", 4, 4, "");
}
if (x == "T16")
{
FadeEnemyToSmoke("brute_2", true);
StopPlayerLookAt();
}
}
void ScaredShitless(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("brute_3", true);
PlaySoundAtEntity("", "24_iron_maiden.snt", "brute_3", 0, false);
PlaySoundAtEntity("", "24_iron_maiden.snt", "brute_3", 0, false);
ShowEnemyPlayerPosition("brute_3");
AddTimer("T117", 1, "Scare_3");
AddTimer("T18", 5, "Scare_3");
}
void Scare_3(string &in asTimer)
{
string x = asTimer;
if (x == "T17")
{
StartPlayerLookAt("brute_3", 4, 4, "");
}
if (x == "T18")
{
FadeEnemyToSmoke("brute_3", true);
StopPlayerLookAt();
}
}
////////////////////////////
// Run when entering map
void OnEnter()
{
PlaySoundAtEntity("", "notice.snt", "Player", 0, false);
SetPlayerActive(false);
SetPlayerCrouching(true);
FadeOut(0);
FadeIn(3);
AddTimer("T1", 3, "Intro");
AddTimer("T2", 6, "Intro");
AddTimer("T3", 8, "Intro");
AddTimer("T4", 10, "Intro");
AddTimer("T5", 12, "Intro");
AddTimer("T6", 20, "Intro");
AddTimer("T7", 23, "Intro");
SetLightVisible("onlight_1", false);
SetLightVisible("onlight_2", false);
SetLightVisible("onlight_3", false);
SetLightVisible("onlight_4", false);
SetLightVisible("onlight_5", false);
SetLightVisible("onlight_6", false);
}

void Intro(string &in asTimer)
{
string x = asTimer;
if (x == "T1")
{
PlayMusic("insanity_monster_roar02.ogg", false, 3, 1, 0, true);
FadeOut(3);
}
else if (x == "T2")
{
FadeIn(3);
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
StartPlayerLookAt("ScriptArea_1", 2, 2, "");
}
else if (x == "T3")
{
PlayMusic("insanity_monster_roar01.ogg", false, 3, 1, 0, true);
StopPlayerLookAt();
StartPlayerLookAt("ScriptArea_2", 2, 2, "");
}
else if (x == "T4")
{
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
StopPlayerLookAt();
}
else if (x == "T5")
{
SetPlayerCrouching(false);
SetPlayerActive(true);
}
else if (x == "T6")
{
StartScreenShake(0.1, 2, 1, 1);
PlayMusic("insanity_monster_roar03.ogg", false, 5, 1, 0, true);
}
else if (x == "T7")
{
PlayMusic("ambience_haunting.ogg", true, 2, 1, 1, true);
}
}

void OnLightActivate(string &in asParent, string &in asChild, int alState)
{
SetLightVisible("onlight_1", true);
SetLightVisible("onlight_2", true);
SetLightVisible("onlight_3", true);
SetLightVisible("onlight_4", true);
SetLightVisible("onlight_5", true);
SetLightVisible("onlight_6", true);
SetLampLit("ontorch_1", true, true);
SetLampLit("ontorch_2", true, true);
SetLampLit("ontorch_3", true, true);
SetLampLit("ontorch_4", true, true);
SetLampLit("ontorch_5", true, true);
SetLampLit("ontorch_6", true, true);
PlaySoundAtEntity("", "27_thump.snt", "onlight", 0, false);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{

}

02-10-2012, 11:48 PM
Find


Messages In This Thread
Unexpected end to file - by Southlaguna - 02-10-2012, 06:14 AM
RE: Unexpected end to file - by Obliviator27 - 02-10-2012, 08:30 AM
RE: Unexpected end to file - by Southlaguna - 02-10-2012, 09:37 PM
RE: Unexpected end to file - by Your Computer - 02-10-2012, 10:05 PM
RE: Unexpected end to file - by Southlaguna - 02-10-2012, 10:29 PM
RE: Unexpected end to file - by Your Computer - 02-10-2012, 10:31 PM
RE: Unexpected end to file - by Southlaguna - 02-10-2012, 10:38 PM
RE: Unexpected end to file - by Your Computer - 02-10-2012, 11:11 PM
RE: Unexpected end to file - by Southlaguna - 02-10-2012, 11:18 PM
RE: Unexpected end to file - by Your Computer - 02-10-2012, 11:39 PM
RE: Unexpected end to file - by Southlaguna - 02-10-2012, 11:48 PM
RE: Unexpected end to file - by Your Computer - 02-11-2012, 12:09 AM
RE: Unexpected end to file - by Southlaguna - 02-11-2012, 12:36 AM
RE: Unexpected end to file - by Your Computer - 02-11-2012, 12:45 AM
RE: Unexpected end to file - by Southlaguna - 02-11-2012, 12:46 AM
RE: Unexpected end to file - by Your Computer - 02-11-2012, 12:51 AM
RE: Unexpected end to file - by Southlaguna - 02-11-2012, 01:01 AM
RE: Unexpected end to file - by Your Computer - 02-11-2012, 01:09 AM
RE: Unexpected end to file - by Southlaguna - 02-11-2012, 01:19 AM
RE: Unexpected end to file - by Your Computer - 02-11-2012, 01:25 AM
RE: Unexpected end to file - by Southlaguna - 02-11-2012, 01:41 AM
RE: Unexpected end to file - by Your Computer - 02-11-2012, 01:46 AM
RE: Unexpected end to file - by xjonx - 03-20-2014, 12:25 AM
RE: Unexpected end to file - by Southlaguna - 02-11-2012, 02:31 AM
RE: Unexpected end to file - by Your Computer - 02-11-2012, 02:36 AM
RE: Unexpected end to file - by Southlaguna - 02-11-2012, 02:40 AM
RE: Unexpected end to file - by Your Computer - 02-11-2012, 03:02 AM
RE: Unexpected end to file - by Southlaguna - 02-11-2012, 03:15 AM
RE: Unexpected end to file - by Southlaguna - 02-11-2012, 09:42 PM
RE: Unexpected end to file - by Your Computer - 02-11-2012, 09:58 PM
RE: Unexpected end to file - by Southlaguna - 02-11-2012, 10:07 PM
RE: Unexpected end to file - by Your Computer - 02-11-2012, 10:29 PM
RE: Unexpected end to file - by Southlaguna - 02-12-2012, 05:33 AM
RE: Unexpected end to file - by Southlaguna - 02-12-2012, 06:59 AM
RE: Unexpected end to file - by Southlaguna - 02-13-2012, 10:48 PM
RE: Unexpected end to file - by oscar1007 - 02-14-2012, 07:32 AM
RE: Unexpected end to file - by Southlaguna - 02-14-2012, 08:39 PM
RE: Unexpected end to file - by PutraenusAlivius - 03-20-2014, 12:35 AM
RE: Unexpected end to file - by Neelke - 03-20-2014, 03:40 PM



Users browsing this thread: 1 Guest(s)