Frictional Games Forum (read-only)

Full Version: Unexpected end of file... I need help! :)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Okay,
If i want to start my story, an error message pops up: unexpected end of file 27, 2.. Can somebody help me?
Scripting file:


void OnStart()
{
AddEntityCollideCallback("Player", "shock", "shock", 1, true);
}


void shock(string &in asParent , string &in asChild , int alState)
{
GiveSanityDamage(7.0f, true);
PlaySoundAtEntity("", "13_press_fail.snt", "Player", 0, false);
PlaySoundAtEntity("", "13_press_done.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
PlaySoundAtEntity("Player", "13_steam.snt", "pipes_thick_bend_short_1", 0, false);
CreateParticleSystemAtEntity("", ps_steam.ps", "steam0", false);
StartPlayerLookAt("look", 4.0, 7.0f, "");
AddTimer("Timer", 0.7f, "looking");
}

void looking(string &in asTimer)
{
StopPlayerLookAt();
}

void OnLeave()
{
void OnLeave()
{

????

Shouldn't this be like:
void OnLeave()
{
}
void OnStart()
{
AddEntityCollideCallback("Player", "shock", "shock", 1, true);
}


void shock(string &in asParent , string &in asChild , int alState)
{
GiveSanityDamage(7.0f, true);
PlaySoundAtEntity("", "13_press_fail.snt", "Player", 0, false);
PlaySoundAtEntity("", "13_press_done.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
PlaySoundAtEntity("Player", "13_steam.snt", "pipes_thick_bend_short_1", 0, false);
CreateParticleSystemAtEntity("", ps_steam.ps", "steam0", false);
StartPlayerLookAt("look", 4.0, 7.0f, "");
AddTimer("Timer", 0.7f, "looking");
}

void looking(string &in asTimer)
{
StopPlayerLookAt();
}

void OnLeave()
{

}

^
Thats the right file ;D |
I need help Sad
i forgot to copy the clamp ;D
If you don't want anything to happen on exiting map, delete it completely(OnLeave). It says 27. row is wrong, but row 27 only includes a '}'
You are missing your OnEnter function. That should solve it. Smile
(03-15-2011, 06:00 PM)Anxt Wrote: [ -> ]You are missing your OnEnter function. That should solve it. Smile

Nope, that would give another error.
Unexpected end of file error means in 99% of the cases that there is a syntax error and guess what, I already found it! Big Grin

Missing " in
CreateParticleSystemAtEntity("", ps_steam.ps", "steam0", false);
okay..... i delete OnLeave. Now he says: 24, 1
Read my post above.
Ahh thanks !! Big Grin
Curse you, Pandemoneus! I thought I was being helpful for once! Tongue
Pages: 1 2