I srsly have no clue what is causing this! - Radical Batz - 06-15-2014
It gets me an error whenever I load my cs which everyone might be familiar with
PHP Code: --------------------------- FATAL ERROR --------------------------- FATAL ERROR: Could not load script file 'custom_stories/Lifeless_The Abandon Ch1/maps/Ch02/10_Sewer.hps'! main (135, 1) : ERR : Unexpected end of file
--------------------------- OK ---------------------------
Now as I look trough my scripts, there seems to be nothing wrong, it always been the same script that always functioned before, but all of a sudden it just started to happen unexpectedly.
Have any clues guys of what is causing this?
Just in case if you might find the problem for me, this is the script I'm using.
PHP Code: void OnStart() { AddEntityCollideCallback("Player", "AreaBreath", "CollideAreaBreath", true, 1); SetEntityPlayerInteractCallback("FakeCrank", "InteractWithCrank", true); SetMessage("Messages", "chapter2", 0); GiveSanityBoostSmall(); AddEntityCollideCallback("Player","AreaDustEnter","CollideDustPaper",true,1); AddUseItemCallback("getoil", "DirtyContainer", "AreaGetOil", "UseContainerOnOil", false); AddUseItemCallback("", "glass_container_oil_1", "FakeCrank", "OilContainerOnFakeCrank", false); }
void CollideAreaBreath(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("rocks", "03_rock_move.snt", "AreaBreath_1", 0.0f, false); CreateParticleSystemAtEntity("warnps", "ps_cave_monster_warn.ps", "AreaBreath_1", false); StartScreenShake(0.01f, 0.5f, 2.0f, 3.5f); PlaySoundAtEntity("breaths", "04_breath.snt", "AreaBreath_1", 0.0f, false); PlaySoundAtEntity("rocksm", "03_rock_move.snt", "AreaBreath_1", RandFloat(2.0f,6.0f), false); CreateParticleSystemAtEntity("breathps", "ps_cave_monster_breath.ps", "AreaBreath_1", false); }
void CollideDustPaper(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("Wind", "general_wind_whirl", "Player", 2, false); CreateParticleSystemAtEntity("PSDoor_3", "ps_dust_whirl.ps", "AreaDust", false); }
void InteractWithCrank(string &in asEntity) { SetMessage("Messages", "NeedOil", 0); AddQuest("InteractWithCrank", "Oil"); PlaySoundAtEntity("rocks", "16_lever_stuck.ogg", "FakeCrank", 0.0f, false); }
void UseContainerOnOil(string &in asItem, string &in asEntity) { RemoveItem(asItem); AddTimer("AddContainer", 1.1f, "TimerAddContainer"); AddTimer("StartCrouch", 0.8f, "TimerCrouch"); AddTimer("StopCrouch", 1.4f, "TimerCrouch"); AddTimer("AddContainer", 1.6f, "TimerStopLookAt"); SetLocalVarInt("FilledContainer", 1);
SetEntityPlayerInteractCallback("AreaOil", "", false); StartPlayerLookAt("AreaLookAtContainer", 3, 3, ""); }
void TimerAddContainer(string &in asTimer) { DestroyParticleSystem("ParticleSystem_42"); SetEntityActive("glass_container_oil_1", true); CreateParticleSystemAtEntity("fill", "ps_oil_jar", "glass_container_oil_1", true); PlaySoundAtEntity("slurp", "16_fill_oil", "glass_container_oil_1", 0.0f, false); }
void TimerCrouch(string &in asTimer) { if(asTimer == "StartCrouch"){ SetPlayerCrouching(true); PlaySoundAtEntity("crouch", "player_crouch", "Player", 0.0f, false); PlaySoundAtEntity("slurp2", "16_water_stream", "glass_container_oil_1", 0.3f, false); return; } SetPlayerCrouching(false); PlaySoundAtEntity("stand", "player_stand", "Player", 0.0f, false); }
void TimerStopLookAt(string &in asTimer) { StopPlayerLookAt(); StopSound("slurp2", 4.0f); }
void EntityCallGlassContainer(string &in asEntity, string &in type) { DestroyParticleSystem("fill"); CreateParticleSystemAtEntity("oilsplah", "ps_oil_splash.ps", "AreaLookAtContainer", true); SetEntityPlayerInteractCallback("AreaOil", "InteractAreaOil02", false); }
void OilContainerOnFakeCrank(string &in asItem, string &in asEntity) {
SetEntityActive("FakeCrank", false); SetLeverStuckState(asEntity, 0, true); SetEntityActive("crank_iron_1", true); CreateParticleSystemAtEntity("oilsplah", "ps_oil_grease.ps", "PS", true); PlaySoundAtEntity("stand", "16_grease_lever.ogg", "FakeCrank", 0.0f, false); }
void MoveBridge(string &in asEntity, int LeverState) { if(LeverState == 1) { PlaySoundAtEntity("unstucksound", "16_bridge_unstuck", "ladder", 0.0f, false); PlaySoundAtEntity("fall", "16_winch_bridge", "ladder", 1.0f, true);
AddTimer("hitground", 1.0f, "TimerBridgeHitGround"); StartScreenShake(0.05f, 0.5f, 0.1f, 0.3f); SetEntityPlayerInteractCallback("bridge_lever_1", "", false); SetMoveObjectStateExt("ladder", 2.66, 8, 8, 0.5, false); GiveSanityBoostSmall(); PlayMusic("23_puzzle.ogg", false, 0.7f, 0, 10, false); SetLeverStuckState(asEntity, LeverState, false); }
void TimerBridgeHitGround(string &in asTimer) { StopSound("fall", 0.3f); StartScreenShake(0.01f, 1.0f, 0.1f, 0.5f); }
void OnEnter() { PlayMusic("16_amb.ogg", true, 0.7, 1, 0, true); }
void OnLeave() {
}
Thanks for helping me as always guys.
RE: I srsly have no clue what is causing this! - MsHannerBananer - 06-15-2014
I've looked through, and with some clever use of the find function in Notepad++, you're missing a closing curly bracket
This thing-> }
I'll look through and see if I can find it for you. ![Smile Smile](https://www.frictionalgames.com/forum/images/smilies/smile.gif)
EDIT:
FOUND IT! >D
Copy and paste the following script and see if that works for you. Also, if you're curious, the missing curly bracket is in your MoveBridge function. ![Smile Smile](https://www.frictionalgames.com/forum/images/smilies/smile.gif)
PHP Code: void OnStart() { AddEntityCollideCallback("Player", "AreaBreath", "CollideAreaBreath", true, 1); SetEntityPlayerInteractCallback("FakeCrank", "InteractWithCrank", true); SetMessage("Messages", "chapter2", 0); GiveSanityBoostSmall(); AddEntityCollideCallback("Player","AreaDustEnter","CollideDustPaper",true,1); AddUseItemCallback("getoil", "DirtyContainer", "AreaGetOil", "UseContainerOnOil", false); AddUseItemCallback("", "glass_container_oil_1", "FakeCrank", "OilContainerOnFakeCrank", false); }
void CollideAreaBreath(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("rocks", "03_rock_move.snt", "AreaBreath_1", 0.0f, false); CreateParticleSystemAtEntity("warnps", "ps_cave_monster_warn.ps", "AreaBreath_1", false); StartScreenShake(0.01f, 0.5f, 2.0f, 3.5f); PlaySoundAtEntity("breaths", "04_breath.snt", "AreaBreath_1", 0.0f, false); PlaySoundAtEntity("rocksm", "03_rock_move.snt", "AreaBreath_1", RandFloat(2.0f,6.0f), false); CreateParticleSystemAtEntity("breathps", "ps_cave_monster_breath.ps", "AreaBreath_1", false); }
void CollideDustPaper(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("Wind", "general_wind_whirl", "Player", 2, false); CreateParticleSystemAtEntity("PSDoor_3", "ps_dust_whirl.ps", "AreaDust", false); }
void InteractWithCrank(string &in asEntity) { SetMessage("Messages", "NeedOil", 0); AddQuest("InteractWithCrank", "Oil"); PlaySoundAtEntity("rocks", "16_lever_stuck.ogg", "FakeCrank", 0.0f, false); }
void UseContainerOnOil(string &in asItem, string &in asEntity) { RemoveItem(asItem); AddTimer("AddContainer", 1.1f, "TimerAddContainer"); AddTimer("StartCrouch", 0.8f, "TimerCrouch"); AddTimer("StopCrouch", 1.4f, "TimerCrouch"); AddTimer("AddContainer", 1.6f, "TimerStopLookAt"); SetLocalVarInt("FilledContainer", 1);
SetEntityPlayerInteractCallback("AreaOil", "", false); StartPlayerLookAt("AreaLookAtContainer", 3, 3, ""); }
void TimerAddContainer(string &in asTimer) { DestroyParticleSystem("ParticleSystem_42"); SetEntityActive("glass_container_oil_1", true); CreateParticleSystemAtEntity("fill", "ps_oil_jar", "glass_container_oil_1", true); PlaySoundAtEntity("slurp", "16_fill_oil", "glass_container_oil_1", 0.0f, false); }
void TimerCrouch(string &in asTimer) { if(asTimer == "StartCrouch"){ SetPlayerCrouching(true); PlaySoundAtEntity("crouch", "player_crouch", "Player", 0.0f, false); PlaySoundAtEntity("slurp2", "16_water_stream", "glass_container_oil_1", 0.3f, false); return; } SetPlayerCrouching(false); PlaySoundAtEntity("stand", "player_stand", "Player", 0.0f, false); }
void TimerStopLookAt(string &in asTimer) { StopPlayerLookAt(); StopSound("slurp2", 4.0f); }
void EntityCallGlassContainer(string &in asEntity, string &in type) { DestroyParticleSystem("fill"); CreateParticleSystemAtEntity("oilsplah", "ps_oil_splash.ps", "AreaLookAtContainer", true); SetEntityPlayerInteractCallback("AreaOil", "InteractAreaOil02", false); }
void OilContainerOnFakeCrank(string &in asItem, string &in asEntity) {
SetEntityActive("FakeCrank", false); SetLeverStuckState(asEntity, 0, true); SetEntityActive("crank_iron_1", true); CreateParticleSystemAtEntity("oilsplah", "ps_oil_grease.ps", "PS", true); PlaySoundAtEntity("stand", "16_grease_lever.ogg", "FakeCrank", 0.0f, false); }
void MoveBridge(string &in asEntity, int LeverState) { if(LeverState == 1) { PlaySoundAtEntity("unstucksound", "16_bridge_unstuck", "ladder", 0.0f, false); PlaySoundAtEntity("fall", "16_winch_bridge", "ladder", 1.0f, true);
AddTimer("hitground", 1.0f, "TimerBridgeHitGround"); StartScreenShake(0.05f, 0.5f, 0.1f, 0.3f); SetEntityPlayerInteractCallback("bridge_lever_1", "", false); SetMoveObjectStateExt("ladder", 2.66, 8, 8, 0.5, false); GiveSanityBoostSmall(); PlayMusic("23_puzzle.ogg", false, 0.7f, 0, 10, false); SetLeverStuckState(asEntity, LeverState, false); } }
void TimerBridgeHitGround(string &in asTimer) { StopSound("fall", 0.3f); StartScreenShake(0.01f, 1.0f, 0.1f, 0.5f); }
void OnEnter() { PlayMusic("16_amb.ogg", true, 0.7, 1, 0, true); }
void OnLeave() {
}
RE: I srsly have no clue what is causing this! - Radical Batz - 06-15-2014
(06-15-2014, 09:31 AM)MsHannerBananer Wrote: I've looked through, and with some clever use of the find function in Notepad++, you're missing a closing curly bracket
This thing-> }
I'll look through and see if I can find it for you. ![Smile Smile](https://www.frictionalgames.com/forum/images/smilies/smile.gif)
EDIT:
FOUND IT! >D
Copy and paste the following script and see if that works for you. Also, if you're curious, the missing curly bracket is in your MoveBridge function. ![Smile Smile](https://www.frictionalgames.com/forum/images/smilies/smile.gif)
PHP Code: void OnStart() { AddEntityCollideCallback("Player", "AreaBreath", "CollideAreaBreath", true, 1); SetEntityPlayerInteractCallback("FakeCrank", "InteractWithCrank", true); SetMessage("Messages", "chapter2", 0); GiveSanityBoostSmall(); AddEntityCollideCallback("Player","AreaDustEnter","CollideDustPaper",true,1); AddUseItemCallback("getoil", "DirtyContainer", "AreaGetOil", "UseContainerOnOil", false); AddUseItemCallback("", "glass_container_oil_1", "FakeCrank", "OilContainerOnFakeCrank", false); }
void CollideAreaBreath(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("rocks", "03_rock_move.snt", "AreaBreath_1", 0.0f, false); CreateParticleSystemAtEntity("warnps", "ps_cave_monster_warn.ps", "AreaBreath_1", false); StartScreenShake(0.01f, 0.5f, 2.0f, 3.5f); PlaySoundAtEntity("breaths", "04_breath.snt", "AreaBreath_1", 0.0f, false); PlaySoundAtEntity("rocksm", "03_rock_move.snt", "AreaBreath_1", RandFloat(2.0f,6.0f), false); CreateParticleSystemAtEntity("breathps", "ps_cave_monster_breath.ps", "AreaBreath_1", false); }
void CollideDustPaper(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("Wind", "general_wind_whirl", "Player", 2, false); CreateParticleSystemAtEntity("PSDoor_3", "ps_dust_whirl.ps", "AreaDust", false); }
void InteractWithCrank(string &in asEntity) { SetMessage("Messages", "NeedOil", 0); AddQuest("InteractWithCrank", "Oil"); PlaySoundAtEntity("rocks", "16_lever_stuck.ogg", "FakeCrank", 0.0f, false); }
void UseContainerOnOil(string &in asItem, string &in asEntity) { RemoveItem(asItem); AddTimer("AddContainer", 1.1f, "TimerAddContainer"); AddTimer("StartCrouch", 0.8f, "TimerCrouch"); AddTimer("StopCrouch", 1.4f, "TimerCrouch"); AddTimer("AddContainer", 1.6f, "TimerStopLookAt"); SetLocalVarInt("FilledContainer", 1);
SetEntityPlayerInteractCallback("AreaOil", "", false); StartPlayerLookAt("AreaLookAtContainer", 3, 3, ""); }
void TimerAddContainer(string &in asTimer) { DestroyParticleSystem("ParticleSystem_42"); SetEntityActive("glass_container_oil_1", true); CreateParticleSystemAtEntity("fill", "ps_oil_jar", "glass_container_oil_1", true); PlaySoundAtEntity("slurp", "16_fill_oil", "glass_container_oil_1", 0.0f, false); }
void TimerCrouch(string &in asTimer) { if(asTimer == "StartCrouch"){ SetPlayerCrouching(true); PlaySoundAtEntity("crouch", "player_crouch", "Player", 0.0f, false); PlaySoundAtEntity("slurp2", "16_water_stream", "glass_container_oil_1", 0.3f, false); return; } SetPlayerCrouching(false); PlaySoundAtEntity("stand", "player_stand", "Player", 0.0f, false); }
void TimerStopLookAt(string &in asTimer) { StopPlayerLookAt(); StopSound("slurp2", 4.0f); }
void EntityCallGlassContainer(string &in asEntity, string &in type) { DestroyParticleSystem("fill"); CreateParticleSystemAtEntity("oilsplah", "ps_oil_splash.ps", "AreaLookAtContainer", true); SetEntityPlayerInteractCallback("AreaOil", "InteractAreaOil02", false); }
void OilContainerOnFakeCrank(string &in asItem, string &in asEntity) {
SetEntityActive("FakeCrank", false); SetLeverStuckState(asEntity, 0, true); SetEntityActive("crank_iron_1", true); CreateParticleSystemAtEntity("oilsplah", "ps_oil_grease.ps", "PS", true); PlaySoundAtEntity("stand", "16_grease_lever.ogg", "FakeCrank", 0.0f, false); }
void MoveBridge(string &in asEntity, int LeverState) { if(LeverState == 1) { PlaySoundAtEntity("unstucksound", "16_bridge_unstuck", "ladder", 0.0f, false); PlaySoundAtEntity("fall", "16_winch_bridge", "ladder", 1.0f, true);
AddTimer("hitground", 1.0f, "TimerBridgeHitGround"); StartScreenShake(0.05f, 0.5f, 0.1f, 0.3f); SetEntityPlayerInteractCallback("bridge_lever_1", "", false); SetMoveObjectStateExt("ladder", 2.66, 8, 8, 0.5, false); GiveSanityBoostSmall(); PlayMusic("23_puzzle.ogg", false, 0.7f, 0, 10, false); SetLeverStuckState(asEntity, LeverState, false); } }
void TimerBridgeHitGround(string &in asTimer) { StopSound("fall", 0.3f); StartScreenShake(0.01f, 1.0f, 0.1f, 0.5f); }
void OnEnter() { PlayMusic("16_amb.ogg", true, 0.7, 1, 0, true); }
void OnLeave() {
}
Thnx Ms, I couldn't have done it without you. I can't believe I missed that XD
RE: I srsly have no clue what is causing this! - Romulator - 06-15-2014
(06-15-2014, 10:52 AM)Badcat5550 Wrote: Thnx man, I couldn't have done it without you. I can't believe I missed that XD
MsHannerBananer is a girl :3
RE: I srsly have no clue what is causing this! - Radical Batz - 06-15-2014
(06-15-2014, 11:14 AM)Romulator Wrote: (06-15-2014, 10:52 AM)Badcat5550 Wrote: Thnx man, I couldn't have done it without you. I can't believe I missed that XD
MsHannerBananer is a girl :3
My bad, cause from her profile pic for me it loos like a guy, if I'm wrong then I'm sorry.
|