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 Of File
hunchbackproduction Offline
Junior Member

Posts: 36
Threads: 13
Joined: Jul 2013
Reputation: 0
#1
Unexpected End Of File

Been sifting through my code for ages and I cant solve it! And im guessing that "Unexpected End Of File" means I have something wrong in my code, from the other threads i've seen?

"main(92,2): ERR : Unexpected end of file"

does "(92,2)" mean that the wrong code is in line 92 ? Because line 92 is the last line...

Heres is my code *It's kinda long :c*:

void PourOpium(string &in flask01_orpiment_1, string &in acid_machine_bottle_empty01_1)
{
SetEntityActive("acid_machine_bottle_empty01_1", false);
SetEntityActive("acid_machine_bottle01_1", true);
SetWheelStuckState("special_burner_1", 0, false);
RemoveItem("flask01_orpiment_1");
AddLocalVarInt("OpiumAdded", 1);
PlaySoundAtEntity("", "puzzle_add_chemical.snt", "acid_machine_bottle01_1", 1, 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("OpiumAdded") == 1)
{
AddTimer("on", 3, "TimerBondCountdown");
}
}
if (alState == -1)
{
DestroyParticleSystem("burner1");
StopSound("IgniteSound", 1);
if (GetLocalVarInt("OpiumAdded") == 1)
{
AddTimer("off", 3, "TimerBondCountdown");
SetLocalVarInt("BondingMix", 1);
}
}
}

void TimerBondCountdown(string &in asTimer)
{
if(asTimer == "on")
{
CreateParticleSystemAtEntity("burnersteam1", "ps_chemical_heat.ps", "BurnerArea_1", false);
PlaySoundAtEntity("FirstBoil","puzzle_boil.snt", "acid_machine_bottle01_1", 1, false);
SetLocalVarInt("BondingMix", 2);
}
if(asTimer == "off")
{
DestroyParticleSystem("burnersteam1");
StopSound("FirstBoil", 1);
SetLocalVarInt("BondingMix", 0);
}
}

void PourIodine(string &in flask01_calamine_1, string &in acid_machine_bottle01_1)
{
if (GetLocalVarInt("BondingMix") == 0)
{
AddUseItemCallback("", "flask01_calamine_1", "acid_machine_bottle01_1", "PourIodine", true);
}
if (GetLocalVarInt("BondingMix") == 2)
{
GivePlayerDamage(101, "BloodSplash", true, true);
PlaySoundAtEntity("scare", "react_scare", "Player", 0.25f, false);
CreateParticleSystemAtEntity("","explosion.ps", "BurnerArea_1", false);
PlaySoundAtEntity("", "break_wood_metal.snt", "BurnerArea_1", 0, false);
AddUseItemCallback("", "flask01_calamine_1", "acid_machine_bottle01_1", "PourIodine", true);
}
if (GetLocalVarInt("BondingMix") == 1)
{
RemoveItem("flask01_calamine_1");
PlaySoundAtEntity("", "puzzle_add_chemical.snt", "acid_machine_bottle01_1", 1, false);
SetWheelStuckState("special_burner_1", -1, false);
GiveSanityBoost();
AddTimer("", 3, "Laudanum");
}

void Laudanum()
{
SetEntityActive("potion_health_1", true);
}

void OnStart()
{
AddUseItemCallback("", "flask01_calamine_1", "acid_machine_bottle01_1", "PourIodine", true);
AddUseItemCallback("", "flask01_orpiment_1", "acid_machine_bottle_empty01_1", "PourOpium", true);
}

void OnEnter()
{

}

void OnLeave()
{
SetupLoadScreen("LoadingText", "Loading", 7, "HNBKChapterOne.jpg");
}

Any help would be appreciated! <3 u guys Big Grin

Scripting level is over 9000!
(This post was last modified: 07-13-2013, 07:13 PM by hunchbackproduction.)
07-13-2013, 07:13 PM
Website Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Unexpected End Of File

http://wiki.frictionalgames.com/hpl2/tut...ed&s[]=end

void PourOpium(string &in flask01_orpiment_1, string &in acid_machine_bottle_empty01_1)

{

    SetEntityActive("acid_machine_bottle_empty01_1", false);

    SetEntityActive("acid_machine_bottle01_1", true);

    SetWheelStuckState("special_burner_1", 0, false);

    RemoveItem("flask01_orpiment_1");

    AddLocalVarInt("OpiumAdded", 1);

    PlaySoundAtEntity("", "puzzle_add_chemical.snt", "acid_machine_bottle01_1", 1, 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("OpiumAdded") == 1)

        {

            AddTimer("on", 3, "TimerBondCountdown");

        }

    }

    if (alState == -1)

    {

        DestroyParticleSystem("burner1");

        StopSound("IgniteSound", 1);

        if (GetLocalVarInt("OpiumAdded") == 1)

        {

            AddTimer("off", 3, "TimerBondCountdown");

            SetLocalVarInt("BondingMix", 1);

        }

    }

}



void TimerBondCountdown(string &in asTimer)

{

    if(asTimer == "on")

    {

        CreateParticleSystemAtEntity("burnersteam1", "ps_chemical_heat.ps", "BurnerArea_1", false);

        PlaySoundAtEntity("FirstBoil","puzzle_boil.snt", "acid_machine_bottle01_1", 1, false);

        SetLocalVarInt("BondingMix", 2);

    }

    if(asTimer == "off")

    {

        DestroyParticleSystem("burnersteam1");

        StopSound("FirstBoil", 1);

        SetLocalVarInt("BondingMix", 0);

    }

}



void PourIodine(string &in flask01_calamine_1, string &in acid_machine_bottle01_1)

{

    if (GetLocalVarInt("BondingMix") == 0)

    {

        AddUseItemCallback("", "flask01_calamine_1", "acid_machine_bottle01_1", "PourIodine", true);

    }

    if (GetLocalVarInt("BondingMix") == 2)

    {

        GivePlayerDamage(101, "BloodSplash", true, true);

        PlaySoundAtEntity("scare", "react_scare", "Player", 0.25f, false);

        CreateParticleSystemAtEntity("","explosion.ps", "BurnerArea_1", false);

        PlaySoundAtEntity("", "break_wood_metal.snt", "BurnerArea_1", 0, false);

        AddUseItemCallback("", "flask01_calamine_1", "acid_machine_bottle01_1", "PourIodine", true);

    }

    if (GetLocalVarInt("BondingMix") == 1)

    {

        RemoveItem("flask01_calamine_1");

        PlaySoundAtEntity("", "puzzle_add_chemical.snt", "acid_machine_bottle01_1", 1, false);

        SetWheelStuckState("special_burner_1", -1, false);

        GiveSanityBoost();

        AddTimer("", 3, "Laudanum");

    }

    }


void Laudanum()

{

    SetEntityActive("potion_health_1", true);

}



void OnStart()

{

    AddUseItemCallback("", "flask01_calamine_1", "acid_machine_bottle01_1", "PourIodine", true);

    AddUseItemCallback("", "flask01_orpiment_1", "acid_machine_bottle_empty01_1", "PourOpium", true);

}



void OnEnter()

{



}



void OnLeave()

{

    SetupLoadScreen("LoadingText", "Loading", 7, "HNBKChapterOne.jpg");

}

Here, fixed.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
07-13-2013, 08:12 PM
Find
hunchbackproduction Offline
Junior Member

Posts: 36
Threads: 13
Joined: Jul 2013
Reputation: 0
#3
RE: Unexpected End Of File

Nevermind guys! I think I found it

(07-13-2013, 08:12 PM)The chaser Wrote: http://wiki.frictionalgames.com/hpl2/tut...ed&s[]=end

void PourOpium(string &in flask01_orpiment_1, string &in acid_machine_bottle_empty01_1)

{

    SetEntityActive("acid_machine_bottle_empty01_1", false);

    SetEntityActive("acid_machine_bottle01_1", true);

    SetWheelStuckState("special_burner_1", 0, false);

    RemoveItem("flask01_orpiment_1");

    AddLocalVarInt("OpiumAdded", 1);

    PlaySoundAtEntity("", "puzzle_add_chemical.snt", "acid_machine_bottle01_1", 1, 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("OpiumAdded") == 1)

        {

            AddTimer("on", 3, "TimerBondCountdown");

        }

    }

    if (alState == -1)

    {

        DestroyParticleSystem("burner1");

        StopSound("IgniteSound", 1);

        if (GetLocalVarInt("OpiumAdded") == 1)

        {

            AddTimer("off", 3, "TimerBondCountdown");

            SetLocalVarInt("BondingMix", 1);

        }

    }

}



void TimerBondCountdown(string &in asTimer)

{

    if(asTimer == "on")

    {

        CreateParticleSystemAtEntity("burnersteam1", "ps_chemical_heat.ps", "BurnerArea_1", false);

        PlaySoundAtEntity("FirstBoil","puzzle_boil.snt", "acid_machine_bottle01_1", 1, false);

        SetLocalVarInt("BondingMix", 2);

    }

    if(asTimer == "off")

    {

        DestroyParticleSystem("burnersteam1");

        StopSound("FirstBoil", 1);

        SetLocalVarInt("BondingMix", 0);

    }

}



void PourIodine(string &in flask01_calamine_1, string &in acid_machine_bottle01_1)

{

    if (GetLocalVarInt("BondingMix") == 0)

    {

        AddUseItemCallback("", "flask01_calamine_1", "acid_machine_bottle01_1", "PourIodine", true);

    }

    if (GetLocalVarInt("BondingMix") == 2)

    {

        GivePlayerDamage(101, "BloodSplash", true, true);

        PlaySoundAtEntity("scare", "react_scare", "Player", 0.25f, false);

        CreateParticleSystemAtEntity("","explosion.ps", "BurnerArea_1", false);

        PlaySoundAtEntity("", "break_wood_metal.snt", "BurnerArea_1", 0, false);

        AddUseItemCallback("", "flask01_calamine_1", "acid_machine_bottle01_1", "PourIodine", true);

    }

    if (GetLocalVarInt("BondingMix") == 1)

    {

        RemoveItem("flask01_calamine_1");

        PlaySoundAtEntity("", "puzzle_add_chemical.snt", "acid_machine_bottle01_1", 1, false);

        SetWheelStuckState("special_burner_1", -1, false);

        GiveSanityBoost();

        AddTimer("", 3, "Laudanum");

    }

    }


void Laudanum()

{

    SetEntityActive("potion_health_1", true);

}



void OnStart()

{

    AddUseItemCallback("", "flask01_calamine_1", "acid_machine_bottle01_1", "PourIodine", true);

    AddUseItemCallback("", "flask01_orpiment_1", "acid_machine_bottle_empty01_1", "PourOpium", true);

}



void OnEnter()

{



}



void OnLeave()

{

    SetupLoadScreen("LoadingText", "Loading", 7, "HNBKChapterOne.jpg");

}

Here, fixed.

Thank you so much anyway :3 Found out the mistake myself xD Thanks anyway.

Scripting level is over 9000!
(This post was last modified: 07-13-2013, 08:23 PM by hunchbackproduction.)
07-13-2013, 08:21 PM
Website Find




Users browsing this thread: 1 Guest(s)