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 I srsly have no clue what is causing this!
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#1
I srsly have no clue what is causing this!

It gets me an error whenever I load my cs which everyone might be familiar with

PHP Code: (Select All)
---------------------------
FATAL ERROR
---------------------------
FATAL ERRORCould not load script file 'custom_stories/Lifeless_The Abandon Ch1/maps/Ch02/10_Sewer.hps'!
 
main (1351) : 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: (Select All)
void OnStart()
{
    
AddEntityCollideCallback("Player""AreaBreath""CollideAreaBreath"true1);
    
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 asParentstring &in asChildint alState)
{
    
PlaySoundAtEntity("rocks""03_rock_move.snt""AreaBreath_1"0.0ffalse);
    
CreateParticleSystemAtEntity("warnps""ps_cave_monster_warn.ps""AreaBreath_1"false);
    
StartScreenShake(0.01f0.5f2.0f3.5f);
    
PlaySoundAtEntity("breaths""04_breath.snt""AreaBreath_1"0.0ffalse);
    
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 asParentstring &in asChildint alState)
{
    
PlaySoundAtEntity("Wind""general_wind_whirl""Player"2false);
     
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.0ffalse);
}

void UseContainerOnOil(string &in asItemstring &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"33"");
}

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.0ffalse);
}

void TimerCrouch(string &in asTimer)
{
    if(
asTimer == "StartCrouch"){
        
SetPlayerCrouching(true);
        
PlaySoundAtEntity("crouch""player_crouch""Player"0.0ffalse);
        
PlaySoundAtEntity("slurp2""16_water_stream""glass_container_oil_1"0.3ffalse);
        return;
    }
    
    
SetPlayerCrouching(false);
    
PlaySoundAtEntity("stand""player_stand""Player"0.0ffalse);
}

void TimerStopLookAt(string &in asTimer)
{
    
StopPlayerLookAt();    
    
StopSound("slurp2"4.0f);
}

void EntityCallGlassContainer(string &in asEntitystring &in type)
{
    
DestroyParticleSystem("fill");
    
CreateParticleSystemAtEntity("oilsplah""ps_oil_splash.ps""AreaLookAtContainer"true);
    
    
SetEntityPlayerInteractCallback("AreaOil""InteractAreaOil02"false);
}

void OilContainerOnFakeCrank(string &in asItemstring &in asEntity)
{

    
SetEntityActive("FakeCrank"false);
    
SetLeverStuckState(asEntity0true);
    
SetEntityActive("crank_iron_1"true);
    
CreateParticleSystemAtEntity("oilsplah""ps_oil_grease.ps""PS"true);  
        
PlaySoundAtEntity("stand""16_grease_lever.ogg""FakeCrank"0.0ffalse);
}

void MoveBridge(string &in asEntityint LeverState)
{
    if(
LeverState == 1
    {
        
PlaySoundAtEntity("unstucksound""16_bridge_unstuck""ladder"0.0ffalse);    
    
PlaySoundAtEntity("fall""16_winch_bridge""ladder"1.0ftrue);

    
AddTimer("hitground"1.0f"TimerBridgeHitGround");
    
    
StartScreenShake(0.05f0.5f0.1f0.3f);
    
    
SetEntityPlayerInteractCallback("bridge_lever_1"""false);
    
SetMoveObjectStateExt("ladder"2.66880.5false);
    
    
GiveSanityBoostSmall();
    
PlayMusic("23_puzzle.ogg"false0.7f010false);
        
SetLeverStuckState(asEntityLeverStatefalse);
 }

void TimerBridgeHitGround(string &in asTimer)
{
    
StopSound("fall"0.3f);    
    
StartScreenShake(0.01f1.0f0.1f0.5f);
}

void OnEnter()
{
    
PlayMusic("16_amb.ogg"true0.710true);
}

void OnLeave()
{



Thanks for helping me as always guys. Smile

(This post was last modified: 06-15-2014, 08:54 AM by Radical Batz.)
06-15-2014, 08:33 AM
Find
MsHannerBananer Offline
Member

Posts: 218
Threads: 34
Joined: Sep 2013
Reputation: 10
#2
RE: I srsly have no clue what is causing this!

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

EDIT:

FOUND IT! >D

Copy and paste the following script and see if that works for you. Big Grin Also, if you're curious, the missing curly bracket is in your MoveBridge function. Smile

PHP Code: (Select All)
void OnStart()
{
    
AddEntityCollideCallback("Player""AreaBreath""CollideAreaBreath"true1);
    
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 asParentstring &in asChildint alState)
{
    
PlaySoundAtEntity("rocks""03_rock_move.snt""AreaBreath_1"0.0ffalse);
    
CreateParticleSystemAtEntity("warnps""ps_cave_monster_warn.ps""AreaBreath_1"false);
    
StartScreenShake(0.01f0.5f2.0f3.5f);
    
PlaySoundAtEntity("breaths""04_breath.snt""AreaBreath_1"0.0ffalse);
    
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 asParentstring &in asChildint alState)
{
    
PlaySoundAtEntity("Wind""general_wind_whirl""Player"2false);
     
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.0ffalse);
}

void UseContainerOnOil(string &in asItemstring &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"33"");
}

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.0ffalse);
}

void TimerCrouch(string &in asTimer)
{
    if(
asTimer == "StartCrouch"){
        
SetPlayerCrouching(true);
        
PlaySoundAtEntity("crouch""player_crouch""Player"0.0ffalse);
        
PlaySoundAtEntity("slurp2""16_water_stream""glass_container_oil_1"0.3ffalse);
        return;
    }
    
    
SetPlayerCrouching(false);
    
PlaySoundAtEntity("stand""player_stand""Player"0.0ffalse);
}

void TimerStopLookAt(string &in asTimer)
{
    
StopPlayerLookAt();    
    
StopSound("slurp2"4.0f);
}

void EntityCallGlassContainer(string &in asEntitystring &in type)
{
    
DestroyParticleSystem("fill");
    
CreateParticleSystemAtEntity("oilsplah""ps_oil_splash.ps""AreaLookAtContainer"true);
    
    
SetEntityPlayerInteractCallback("AreaOil""InteractAreaOil02"false);
}

void OilContainerOnFakeCrank(string &in asItemstring &in asEntity)
{

    
SetEntityActive("FakeCrank"false);
    
SetLeverStuckState(asEntity0true);
    
SetEntityActive("crank_iron_1"true);
    
CreateParticleSystemAtEntity("oilsplah""ps_oil_grease.ps""PS"true);  
        
PlaySoundAtEntity("stand""16_grease_lever.ogg""FakeCrank"0.0ffalse);
}

void MoveBridge(string &in asEntityint LeverState)
{
    if(
LeverState == 1
    {
        
PlaySoundAtEntity("unstucksound""16_bridge_unstuck""ladder"0.0ffalse);    
    
PlaySoundAtEntity("fall""16_winch_bridge""ladder"1.0ftrue);

    
AddTimer("hitground"1.0f"TimerBridgeHitGround");
    
    
StartScreenShake(0.05f0.5f0.1f0.3f);
    
    
SetEntityPlayerInteractCallback("bridge_lever_1"""false);
    
SetMoveObjectStateExt("ladder"2.66880.5false);
    
    
GiveSanityBoostSmall();
    
PlayMusic("23_puzzle.ogg"false0.7f010false);
        
SetLeverStuckState(asEntityLeverStatefalse);
 }
 
}

void TimerBridgeHitGround(string &in asTimer)
{
    
StopSound("fall"0.3f);    
    
StartScreenShake(0.01f1.0f0.1f0.5f);
}

void OnEnter()
{
    
PlayMusic("16_amb.ogg"true0.710true);
}

void OnLeave()
{



(This post was last modified: 06-15-2014, 09:38 AM by MsHannerBananer.)
06-15-2014, 09:31 AM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#3
RE: I srsly have no clue what is causing this!

(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

EDIT:

FOUND IT! >D

Copy and paste the following script and see if that works for you. Big Grin Also, if you're curious, the missing curly bracket is in your MoveBridge function. Smile

PHP Code: (Select All)
void OnStart()
{
    
AddEntityCollideCallback("Player""AreaBreath""CollideAreaBreath"true1);
    
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 asParentstring &in asChildint alState)
{
    
PlaySoundAtEntity("rocks""03_rock_move.snt""AreaBreath_1"0.0ffalse);
    
CreateParticleSystemAtEntity("warnps""ps_cave_monster_warn.ps""AreaBreath_1"false);
    
StartScreenShake(0.01f0.5f2.0f3.5f);
    
PlaySoundAtEntity("breaths""04_breath.snt""AreaBreath_1"0.0ffalse);
    
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 asParentstring &in asChildint alState)
{
    
PlaySoundAtEntity("Wind""general_wind_whirl""Player"2false);
     
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.0ffalse);
}

void UseContainerOnOil(string &in asItemstring &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"33"");
}

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.0ffalse);
}

void TimerCrouch(string &in asTimer)
{
    if(
asTimer == "StartCrouch"){
        
SetPlayerCrouching(true);
        
PlaySoundAtEntity("crouch""player_crouch""Player"0.0ffalse);
        
PlaySoundAtEntity("slurp2""16_water_stream""glass_container_oil_1"0.3ffalse);
        return;
    }
    
    
SetPlayerCrouching(false);
    
PlaySoundAtEntity("stand""player_stand""Player"0.0ffalse);
}

void TimerStopLookAt(string &in asTimer)
{
    
StopPlayerLookAt();    
    
StopSound("slurp2"4.0f);
}

void EntityCallGlassContainer(string &in asEntitystring &in type)
{
    
DestroyParticleSystem("fill");
    
CreateParticleSystemAtEntity("oilsplah""ps_oil_splash.ps""AreaLookAtContainer"true);
    
    
SetEntityPlayerInteractCallback("AreaOil""InteractAreaOil02"false);
}

void OilContainerOnFakeCrank(string &in asItemstring &in asEntity)
{

    
SetEntityActive("FakeCrank"false);
    
SetLeverStuckState(asEntity0true);
    
SetEntityActive("crank_iron_1"true);
    
CreateParticleSystemAtEntity("oilsplah""ps_oil_grease.ps""PS"true);  
        
PlaySoundAtEntity("stand""16_grease_lever.ogg""FakeCrank"0.0ffalse);
}

void MoveBridge(string &in asEntityint LeverState)
{
    if(
LeverState == 1
    {
        
PlaySoundAtEntity("unstucksound""16_bridge_unstuck""ladder"0.0ffalse);    
    
PlaySoundAtEntity("fall""16_winch_bridge""ladder"1.0ftrue);

    
AddTimer("hitground"1.0f"TimerBridgeHitGround");
    
    
StartScreenShake(0.05f0.5f0.1f0.3f);
    
    
SetEntityPlayerInteractCallback("bridge_lever_1"""false);
    
SetMoveObjectStateExt("ladder"2.66880.5false);
    
    
GiveSanityBoostSmall();
    
PlayMusic("23_puzzle.ogg"false0.7f010false);
        
SetLeverStuckState(asEntityLeverStatefalse);
 }
 
}

void TimerBridgeHitGround(string &in asTimer)
{
    
StopSound("fall"0.3f);    
    
StartScreenShake(0.01f1.0f0.1f0.5f);
}

void OnEnter()
{
    
PlayMusic("16_amb.ogg"true0.710true);
}

void OnLeave()
{



Thnx Ms, I couldn't have done it without you. I can't believe I missed that XD

(This post was last modified: 06-15-2014, 11:20 AM by Radical Batz.)
06-15-2014, 10:52 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#4
RE: I srsly have no clue what is causing this!

(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

Discord: Romulator#0001
[Image: 3f6f01a904.png]
06-15-2014, 11:14 AM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#5
RE: I srsly have no clue what is causing this!

(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.

06-15-2014, 11:21 AM
Find




Users browsing this thread: 3 Guest(s)