Kyle
Posting Freak
Posts: 911
Threads: 36
Joined: Sep 2010
Reputation:
7
|
Unexpected End Of File
I checked my script AT LEAST 10 TIMES, checking the beginning and ending of each quotation, bracket, and parentheses. There is over 250 lines of code. I must be going crazy, but this is my last hope of ever getting my custom story to run.
void OnStart()
{
if(ScriptDebugOn())
{
SetEntityPlayerInteractCallback("cell_bucket_1", "DebugLantern", true);
}
//Preloading//
PreloadSound("player_bodyfall.snt"); PreloadSound("break_glass_bottle.snt"); PreloadSound("react_sigh.snt");
PreloadSound("hurt_pant.snt"); PreloadSound("player_cough.snt"); PreloadSound("react_scare.snt");
PreloadSound("19_inject.snt"); PreloadSound("23_strap3.snt"); PreloadSound("react_breath.snt");
PreloadSound("react_breath_slow.snt"); PreloadSound("react_sigh.snt"); PreloadSound("18_prisoner1.snt");
PreloadSound("18_prisoner2.snt"); PreloadSound("18_prisoner3.snt"); PreloadSound("18_prisoner4.snt");
PreloadParticleSystem("ps_dust_elevator_crash.ps");
SetEntityInteractionDisabled("key_tomb_rusty_1", true);
SetEntityInteractionDisabled("ceremony_knife_2", true);
SetEntityInteractionDisabled("lantern_broken", true);
SetEntityPlayerInteractCallback("ceremony_knife_2", "PickDaggerFromBody", true);
SetEntityPlayerInteractCallback("ScriptArea_7", "LanternMessage", true);
AddUseItemCallback("", "ceremony_knife_1", "antidote_corpse_1", "UsedDaggerOnBody", true);
AddEntityCollideCallback("Player", "ScriptArea_14", "ScarySound05", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_13", "ScarySound04", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_12", "ScarySound03", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_6", "ScarySound02", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_5", "ScarySound01", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_10", "BodyHint", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "FallBreakLantern", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_1", "TeleportToCellar", false, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "MonsterSpawn", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_8", "RockDrop01", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_9", "RockDrop02", true, 1);
AddUseItemCallback("", "RustyWornKey01", "prison_1", "UnlockDoor01", true);
}
void Scary5(string &in asTimer)
{
PlaySoundAtEntity("", "react_sigh.snt", "Player", 0, false);
}
void Scary4(string &in asTimer)
{
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
}
void Scary3(string &in asTimer)
{
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
}
void Scary2(string &in asTimer)
{
StopPlayerLookAt();
}
void Scary1(string &in asTimer)
{
PlaySoundAtEntity("", "23_strap3.snt", "prison_1", 0, false);
StartPlayerLookAt("prison_1", 2, 4, "");
}
void ScarySound05(string &in asParent, string &in asChild, int alState)
{
AddTimer("Sound1", 1, "Scary1");
AddTimer("Sound2", 3, "Scary2");
AddTimer("Sound3", 4, "Scary3");
AddTimer("Sound4", 5, "Scary4");
AddTimer("Sound5", 6, "Scary5");
]
void ScarySound04(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "18_prisoner4.snt", "antidote_corpse_1", 1, false);
}
void ScarySound03(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "18_prisoner3.snt", "antidote_corpse_1", 1, false);
}
void ScarySound02(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "18_prisoner2.snt", "antidote_corpse_1", 1, false);
}
void ScarySound01(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "18_prisoner1.snt", "antidote_corpse_1", 1, false);
}
void UnlockDoor01(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prison_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "prison_1", 0, false);
RemoveItem("RustyWornKey01");
}
void PickDaggerFromBody03(string &in asTimer)
{
StopPlayerLookAt();
}
void PickDaggerFromBody02(string &in asTimer)
{
StartPlayerLookAt("ScriptArea_11", 4, 4, "");
AddTimer("", 2, "PickDaggerFromBody03");
}
void PickDaggerFromBody(string &in asEntity)
{
PlaySoundAtEntity("", "react_scare.snt", "Player", 1, false);
AddTimer("", 0.5, "PickDaggerFromBody02");
SetEntityActive("servant_grunt_2", true);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_7", 0, "");
}
void UsedDaggerOnBody04(string &in asTimer)
{
SetEntityActive("key_tomb_rusty_1", false);
SetEntityActive("RustyWornKey01", true);
SetEntityInteractionDisabled("ceremony_knife_2", false);
}
void UsedDaggerOnBody03(string &in asTimer)
{
StopPropMovement("ceremony_knife_2");
SetEntityActive("key_tomb_rusty_1", true);
AddTimer("", 1.0f, "UsedDaggerOnBody04");
}
void UsedDaggerOnBody02(string &in asTimer)
{
RotatePropToSpeed("ceremony_knife_2", 0.5, 0.5, 0, 0, -15, true, "antidote_corpse_1");
AddTimer("", 2.0f, "UsedDaggerOnBody03");
}
void UsedDaggerOnBody(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("", "19_inject.snt", "Player", 1, false);
RemoveItem("ceremony_knife_1");
SetEntityActive("ceremony_knife_2", true);
AddTimer("", 1.0f, "UsedDaggerOnBody02");
}
void BodyHint(string &in asParent, string &in asChild, int alState)
{
SetMessage("Message", "Hint10", 4);
}
void RockDrop04(string &in asTimer)
{
SetEntityActive("stone_small01_5", true);
}
void RockDrop03(string &in asTimer)
{
SetEntityActive("stone_small01_4", true);
}
void RockDrop02(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "29_crumble.snt", "Player", 1, false);
SetEntityActive("stone_small01_3", true);
AddTimer("", 1, "RockDrop03");
AddTimer("", 2, "RockDrop04");
}
void RockDrop01(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("stone_smal01_1", true);
SetEntityActive("stone_small01_2", true);
}
void MonsterSpawn(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
}
void LanternMessage(string &in asEntity)
{
SetMessage("Message", "Hint09", 4);
}
void GetUp02(string &in asTimer)
{
PlayMusic("25_amb.ogg", true, 1.5, 4, 0, false);
SetLanternDisabled(false);
FadeRadialBlurTo(0, 2);
SetPlayerJumpDisabled(false);
PlaySoundAtEntity("", "react_sigh.snt", "Player", 1, false);
if (HasItem("lantern") == true)
{
RemoveItem("lantern");
}
}
void DebugLantern(string &in asEntity)
{
GiveItemFromFile("lantern", "lantern.ent");
}
void GetUp01(string &in asTimer)
{
PlaySoundAtEntity("", "hurt_pant.snt", "Player", 1, false);
}
void PlayerSound(string &in asTimer)
{
PlaySoundAtEntity("", "player_cough.snt", "Player", 1, false);
}
void LanternBreak(string &in asTimer)
{
PlaySoundAtEntity("", "break_glass_bottle.snt", "Player", 1, false);
}
void FallBreakLantern(string &in asParent, string &in asChild, int alState)
{
StopMusic(1, 0);
SetEntityActive("LadderArea_1", false);
CreateParticleSystemAtEntity("", "ps_dust_elevator_crash.ps", "ladder_broken_debris_1", false);
SetEntityActive("ladder_mount_21", false);
SetEntityActive("ladder_mount_22", false);
SetEntityActive("ladder_mount_23", false);
SetEntityActive("ladder_mount_24", false);
SetEntityActive("ladder_broken_debris_1", true);
FadeRadialBlurTo(2, 3);
SetPlayerJumpDisabled(true);
GiveSanityDamage(20, false);
PlaySoundAtEntity("", "player_bodyfall.snt", "Player", 1, false);
SetPlayerCrouching(true);
FadeOut(2);
FadeIn(4);
SetLanternDisabled(true);
RemoveItem("lantern");
RemoveItem("lantern_1");
AddTimer("", 1.0f, "LanternBreak");
AddTimer("", 4.0f, "PlayerSound");
AddTimer("", 8.0f, "GetUp");
AddTimer("", 9.5f, "GetUp02");
}
void TeleportToCellar(string &in asParent, string &in asChild, int alState)
{
ChangeMap("Ruins-Cellar", "PlayerStartArea_2", "", "");
}
void OnEnter()
{
}
void OnLeave()
{
}
I'm going to have to use notepad++ for sure...
(This post was last modified: 04-29-2011, 03:18 AM by Kyle.)
|
|
04-29-2011, 03:16 AM |
|
MrBigzy
Senior Member
Posts: 616
Threads: 18
Joined: Mar 2011
Reputation:
8
|
RE: Unexpected End Of File
void ScarySound05(string &in asParent, string &in asChild, int alState)
{
AddTimer("Sound1", 1, "Scary1");
AddTimer("Sound2", 3, "Scary2");
AddTimer("Sound3", 4, "Scary3");
AddTimer("Sound4", 5, "Scary4");
AddTimer("Sound5", 6, "Scary5");
]
Yup.
(This post was last modified: 04-29-2011, 03:26 AM by MrBigzy.)
|
|
04-29-2011, 03:26 AM |
|
Kyle
Posting Freak
Posts: 911
Threads: 36
Joined: Sep 2010
Reputation:
7
|
RE: Unexpected End Of File
(04-29-2011, 03:26 AM)MrBigzy Wrote: void ScarySound05(string &in asParent, string &in asChild, int alState)
{
AddTimer("Sound1", 1, "Scary1");
AddTimer("Sound2", 3, "Scary2");
AddTimer("Sound3", 4, "Scary3");
AddTimer("Sound4", 5, "Scary4");
AddTimer("Sound5", 6, "Scary5");
]
Yup.
:O Are you a hacker or what? Thanks so much, I wasted a few hours on one... little... bracket....
|
|
04-29-2011, 03:41 AM |
|
|