Unexpected end of file crash - Lleviathyn - 04-06-2013
Everything else has been working fine until I added this for my chemistry puzzle:
Code: void PlaceJar2(string &in asParent, string &in asChild)
{
StartPlayerLookAt("unfinished_cure_2", 1.0, 1.0, "");
RemoveItem("heated_jar");
AddTimer("looking", 2.0, "LookJar");
}
void LookJar(string &in asTimer)
{
SetEntityActive("unfinished_cure_2", true);
StopPlayerLookAt();
PlaySoundAtEntity("", "impact_glass_med.snt", "unfinished_cure_2", 0, false);
AddUseItemCallback("", "sodamide", "funnel", "AddSodamide", true);
}
void AddSodamide(string &in asParent, string &in asChild)
{
StartPlayerLookAt("unfinished_cure_2", 1.0, 1.0, "");
RemoveItem("sodamide");
AddTimer("looking2", 2.0, "LookJar2");
}
void LookJar2(string &in asTimer)
{
SetEntityActive("unfinished_cure_2", false);
StopPlayerLookAt();
PlaySoundAtEntity("", "puzzle_add_chemical.snt", "cure", 0, false);
AddTimer("pickitup", 2.0, "PickUpCure");
}
void PickUpCure(string &in asTimer)
{
SetEntityActive("cure", true);
StartPlayerLookAt("cure", 1.0, 1.0, "");
AddTimer("stoplooking", 1.0, "StopCureLook");
CompleteQuest("curequest", "CureQuest");
}
void StopCureLook(string &in asTimer)
{
StopPlayerLookAt();
}
The crash window says "Unexpected end of file" and tells me its on my last line. So I remove the "void StopCureLook" temporarily to see if it fixes the problem, and the same thing happens saying it's on my last line again.
RE: Unexpected end of file crash - Statyk - 04-06-2013
Can you post the whole .hps in here?
RE: Unexpected end of file crash - mrsomeepicrandomguy - 04-06-2013
Even If it says its an error on the last line doesn't mean it is on the last line, Its saying that some thing is missing im the script somewhere. Like a "
RE: Unexpected end of file crash - Lleviathyn - 04-06-2013
Yeah, that's what I assumed.
Anyways, the whole script:
Code: void OnStart()
{
WakeUp();
SetPlayerLampOil(0);
SetWheelStuckState("burner", 2, false);
AddUseItemCallback("", "crowbar", "kitchen_door", "UsedCrowbarOnDoor", true);
AddUseItemCallback("", "jar_mix", "PlaceJarArea", "PlaceJar", true);
AddUseItemCallback("", "heated_jar", "PlaceJarArea2, "PlaceJar2", true);
SetEntityConnectionStateChangeCallback("burner", "LightBurner");
AddEntityCollideCallback("crowbar_joint", "break_door_script", "CollideAreaBreakDoor", true, 1);
AddEntityCollideCallback("Player", "curequest_area", "CureMemento", true, 1);
}
void OnEnter()
{
PlayMusic("25_amb.ogg", true, 1.0f, 5, 0, true);
SetMapDisplayNameEntry("00_hub.map");
}
void WakeUp()
{
FadeOut(0);
FadeIn(20);
PlayGuiSound("player_cough.snt", 1.0f);
FadeImageTrailTo(2, 2);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220);
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true);
SetInventoryDisabled(true);
AddTimer("trig1", 3.0f, "Recover");
}
void Recover(string &in asTimer)
{
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33);
FadeRadialBlurTo(0.0, 1);
SetPlayerCrouching(false);
SetInventoryDisabled(false);
FadeImageTrailTo(0,1);
}
void CrowbarHint(string &in entity)
{
if(GetSwingDoorLocked("kitchen_door") == true)
{
SetMessage("Messages", "kitchen_door_hint", 0);
}
}
void UsedCrowbarOnDoor(string &in asItem, string &in asEntity)
{
AddTimer("", 0.2, "TimerSwitchShovel");
RemoveItem("crowbar");
}
void TimerSwitchShovel(string &in asTimer)
{
PlaySoundAtEntity("","puzzle_place_jar.snt", "", 0, false);
SetEntityActive("crowbar_joint", true);
}
void CollideAreaBreakDoor(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorLocked("kitchen_door", false, true);
AddPropImpulse("kitchen_door", 0, 0, -50, "World");
SetSwingDoorDisableAutoClose("kitchen_door", true);
SetSwingDoorClosed("kitchen_door", false, false);
SetMoveObjectState("kitchen_door", 1);
PlaySoundAtEntity("","break_wood_metal", "door_break_effect", 0, false);
CreateParticleSystemAtEntity("", "ps_hit_wood", "door_break_effect", false);
SetEntityActive("crowbar_joint", false);
SetLocalVarInt("Door", 1);
}
void CureMemento(string &in asParent, string &in asChild, int alState)
{
AddQuest("curequest", "CureQuest");
}
void PlaceJar(string &in asParent, string &in asChild)
{
SetEntityActive("unfinished_cure_1", true);
StartPlayerLookAt("unfinished_cure_1", 1.0, 1.0, "");
RemoveItem("jar_mix");
SetWheelStuckState("burner", 0, false);
AddLocalVarInt("JarSet", 1);
PlaySoundAtEntity("", "impact_glass_med.snt", "unfinished_cure_1", 0, false);
}
void LightBurner(string &in asEntity, int alState)
{
if (alState == 1)
{
CreateParticleSystemAtEntity("burner1", "ps_fire_lab_burner.ps", "BurnerArea", false);
PlaySoundAtEntity("IgniteSound", "general_fire_burning_low", "BurnerArea", 1, false);
if (GetLocalVarInt("JarSet") == 1)
{
AddTimer("on", 3, "HeatedJar");
}
}
if (alState == -1)
{
DestroyParticleSystem("burner1");
StopSound("IgniteSound", 1);
if (GetLocalVarInt("JarSet") == 1)
{
AddTimer("off", 3, "HeatedJar");
}
}
}
void HeatedJar(string &in asTimer)
{
SetEntityActive("unfinished_cure_1", false);
SetEntityActive("heated_jar", true);
StopSound("IgniteSound", 1);
DestroyParticleSystem("burner1");
SetWheelStuckState("burner", 2, false);
}
void PlaceJar2(string &in asParent, string &in asChild)
{
StartPlayerLookAt("unfinished_cure_2", 1.0, 1.0, "");
RemoveItem("heated_jar");
AddTimer("looking", 2.0, "LookJar");
}
void LookJar(string &in asTimer)
{
SetEntityActive("unfinished_cure_2", true);
StopPlayerLookAt();
PlaySoundAtEntity("", "impact_glass_med.snt", "unfinished_cure_2", 0, false);
AddUseItemCallback("", "sodamide", "funnel", "AddSodamide", true);
}
void AddSodamide(string &in asParent, string &in asChild)
{
StartPlayerLookAt("unfinished_cure_2", 1.0, 1.0, "");
RemoveItem("sodamide");
AddTimer("looking2", 2.0, "LookJar2");
}
void LookJar2(string &in asTimer)
{
SetEntityActive("unfinished_cure_2", false);
StopPlayerLookAt();
PlaySoundAtEntity("", "puzzle_add_chemical.snt", "cure", 0, false);
AddTimer("pickitup", 2.0, "PickUpCure");
}
void PickUpCure(string &in asTimer)
{
SetEntityActive("cure", true);
StartPlayerLookAt("cure", 1.0, 1.0, "");
AddTimer("stoplooking", 1.0, "StopCureLook");
CompleteQuest("curequest", "CureQuest");
}
void StopCureLook(string &in asTimer)
{
StopPlayerLookAt();
}
RE: Unexpected end of file crash - Tiger - 04-06-2013
(04-06-2013, 01:40 PM)BlueRex Wrote: Yeah, that's what I assumed.
Anyways, the whole script:
AddUseItemCallback("", "heated_jar", "PlaceJarArea2, "PlaceJar2", true);
there ya' go
RE: Unexpected end of file crash - Lleviathyn - 04-06-2013
It worked! Thank you.
RE: Unexpected end of file crash - VeNoMzTeamHysterical - 04-15-2013
(04-06-2013, 04:18 PM)BlueRex Wrote: It worked! Thank you.
Next time please change title to [solved] or something thanks.
|