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
Unexpected end of file... I need help! :)
Janni1234 Offline
Member

Posts: 134
Threads: 24
Joined: Jan 2011
Reputation: 1
#1
Unexpected end of file... I need help! :)

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()
{
03-15-2011, 05:51 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#2
RE: Unexpected end of file... I need help! :)

void OnLeave()
{

????

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

03-15-2011, 05:52 PM
Website Find
Janni1234 Offline
Member

Posts: 134
Threads: 24
Joined: Jan 2011
Reputation: 1
#3
RE: Unexpected end of file... I need help! :)

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
(This post was last modified: 03-15-2011, 05:54 PM by Janni1234.)
03-15-2011, 05:52 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#4
RE: Unexpected end of file... I need help! :)

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

(This post was last modified: 03-15-2011, 05:55 PM by Tanshaydar.)
03-15-2011, 05:55 PM
Website Find
Anxt Offline
Senior Member

Posts: 588
Threads: 12
Joined: Mar 2011
Reputation: 10
#5
RE: Unexpected end of file... I need help! :)

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

03-15-2011, 06:00 PM
Find
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#6
RE: Unexpected end of file... I need help! :)

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

03-15-2011, 06:04 PM
Find
Janni1234 Offline
Member

Posts: 134
Threads: 24
Joined: Jan 2011
Reputation: 1
#7
RE: Unexpected end of file... I need help! :)

okay..... i delete OnLeave. Now he says: 24, 1
03-15-2011, 06:05 PM
Find
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#8
RE: Unexpected end of file... I need help! :)

Read my post above.

03-15-2011, 06:06 PM
Find
Janni1234 Offline
Member

Posts: 134
Threads: 24
Joined: Jan 2011
Reputation: 1
#9
RE: Unexpected end of file... I need help! :)

Ahh thanks !! Big Grin
03-15-2011, 06:09 PM
Find
Anxt Offline
Senior Member

Posts: 588
Threads: 12
Joined: Mar 2011
Reputation: 10
#10
RE: Unexpected end of file... I need help! :)

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

03-15-2011, 06:11 PM
Find




Users browsing this thread: 1 Guest(s)