Frictional Games Forum (read-only)
Unexpected end of file... I need help! :) - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Unexpected end of file... I need help! :) (/thread-6902.html)

Pages: 1 2


Unexpected end of file... I need help! :) - Janni1234 - 03-15-2011

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()
{


RE: Unexpected end of file... I need help! :) - Tanshaydar - 03-15-2011

void OnLeave()
{

????

Shouldn't this be like:
void OnLeave()
{
}


RE: Unexpected end of file... I need help! :) - Janni1234 - 03-15-2011

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


RE: Unexpected end of file... I need help! :) - Tanshaydar - 03-15-2011

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 '}'


RE: Unexpected end of file... I need help! :) - Anxt - 03-15-2011

You are missing your OnEnter function. That should solve it. Smile


RE: Unexpected end of file... I need help! :) - Pandemoneus - 03-15-2011

(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);


RE: Unexpected end of file... I need help! :) - Janni1234 - 03-15-2011

okay..... i delete OnLeave. Now he says: 24, 1


RE: Unexpected end of file... I need help! :) - Pandemoneus - 03-15-2011

Read my post above.


RE: Unexpected end of file... I need help! :) - Janni1234 - 03-15-2011

Ahh thanks !! Big Grin


RE: Unexpected end of file... I need help! :) - Anxt - 03-15-2011

Curse you, Pandemoneus! I thought I was being helpful for once! Tongue