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
Scripting Error: Unexpected End In Script Please Help!
JohnandSerena Offline
Junior Member

Posts: 11
Threads: 4
Joined: Dec 2012
Reputation: 1
#1
Scripting Error: Unexpected End In Script Please Help!

I have an unexpected end on 35,2 it says and idk what is wrong but can someone please help. Heres my script:

///////////////////////////
// Run when entering map
void OnStart()
{
wakeUp();
}
void wakeUp ()
{
FadeOut(0);
FadeIn(20);
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220);
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true);
AddTimer("trig1", 11.0f, "beginStory");

void beginStory(string &in asTimer)
{
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33);
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{
}
(This post was last modified: 02-21-2013, 12:19 PM by JohnandSerena.)
02-21-2013, 12:18 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Scripting Error: Unexpected End In Script Please Help!

Please give us your full script. The script that you posted only has 34 lines.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 02-21-2013, 12:21 PM by PutraenusAlivius.)
02-21-2013, 12:20 PM
Find
JohnandSerena Offline
Junior Member

Posts: 11
Threads: 4
Joined: Dec 2012
Reputation: 1
#3
RE: Scripting Error: Unexpected End In Script Please Help!

(02-21-2013, 12:20 PM)JustAnotherPlayer Wrote: Please give us your full script. The script that you posted only has 34 lines.

My bad it says Unexpected end in script: 34,2
02-21-2013, 12:26 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#4
RE: Scripting Error: Unexpected End In Script Please Help!

(02-21-2013, 12:26 PM)JohnandSerena Wrote:
(02-21-2013, 12:20 PM)JustAnotherPlayer Wrote: Please give us your full script. The script that you posted only has 34 lines.

My bad it says Unexpected end in script: 34,2
At
PHP Code: (Select All)
////////////////////////////
// Run when leaving map
void OnLeave()
{

There's an space at the last curly bracket (}). Remove it.
--
EDIT:
STOP READING AND EDIT IT!
Meanwhile, here's my script.
PHP Code: (Select All)
void OnStart()
{
wakeUp();
}
void wakeUp ()
{
FadeOut(0);
FadeIn(20);
FadeImageTrailTo(22);
FadeSepiaColorTo(1004);
SetPlayerActive(false);
FadePlayerRollTo(50220220);
FadeRadialBlurTo(0.152);
SetPlayerCrouching(true);
AddTimer("trig1"11.0f"beginStory");
}
void beginStory(string &in asTimer)
{
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(03333);
FadeRadialBlurTo(0.01);
FadeSepiaColorTo(04);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}

void OnLeave()
{


"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 02-21-2013, 02:03 PM by PutraenusAlivius.)
02-21-2013, 12:30 PM
Find
JohnandSerena Offline
Junior Member

Posts: 11
Threads: 4
Joined: Dec 2012
Reputation: 1
#5
RE: Scripting Error: Unexpected End In Script Please Help!

(02-21-2013, 12:30 PM)JustAnotherPlayer Wrote:
(02-21-2013, 12:26 PM)JohnandSerena Wrote:
(02-21-2013, 12:20 PM)JustAnotherPlayer Wrote: Please give us your full script. The script that you posted only has 34 lines.

My bad it says Unexpected end in script: 34,2
At
PHP Code: (Select All)
////////////////////////////
// Run when leaving map
void OnLeave()
{

There's an space at the last curly bracket (}). Remove it.
--
EDIT:
STOP READING AND EDIT IT!
Meanwhile, here's my script.
PHP Code: (Select All)
void OnStart()
{
wakeUp();
}
void wakeUp ()
{
FadeOut(0);
FadeIn(20);
FadeImageTrailTo(22);
FadeSepiaColorTo(1004);
SetPlayerActive(false);
FadePlayerRollTo(50220220);
FadeRadialBlurTo(0.152);
SetPlayerCrouching(true);
AddTimer("trig1"11.0f"beginStory");

void beginStory(string &in asTimer)
{
ChaePlyerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(03333);
FadeRadialBlurTo(0.01);
FadeSepiaColorTo(04);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}

void OnLeave()
{


Thanks ill try that when i get to my laptop again!

(02-21-2013, 12:30 PM)JustAnotherPlayer Wrote:
(02-21-2013, 12:26 PM)JohnandSerena Wrote:
(02-21-2013, 12:20 PM)JustAnotherPlayer Wrote: Please give us your full script. The script that you posted only has 34 lines.

My bad it says Unexpected end in script: 34,2
At
PHP Code: (Select All)
////////////////////////////
// Run when leaving map
void OnLeave()
{

There's an space at the last curly bracket (}). Remove it.
--
EDIT:
STOP READING AND EDIT IT!
Meanwhile, here's my script.
PHP Code: (Select All)
void OnStart()
{
wakeUp();
}
void wakeUp ()
{
FadeOut(0);
FadeIn(20);
FadeImageTrailTo(22);
FadeSepiaColorTo(1004);
SetPlayerActive(false);
FadePlayerRollTo(50220220);
FadeRadialBlurTo(0.152);
SetPlayerCrouching(true);
AddTimer("trig1"11.0f"beginStory");

void beginStory(string &in asTimer)
{
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(03333);
FadeRadialBlurTo(0.01);
FadeSepiaColorTo(04);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}

void OnLeave()
{

(This post was last modified: 02-21-2013, 12:53 PM by JohnandSerena.)
02-21-2013, 12:51 PM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#6
RE: Scripting Error: Unexpected End In Script Please Help!

.... spaces at the end of the curly brace does not matter, you can pretty much stick extra white space wherever you like.

You are missing the closing brace '}' at the end of the 'wakeup' function

02-21-2013, 01:28 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#7
RE: Scripting Error: Unexpected End In Script Please Help!

(02-21-2013, 01:28 PM)Adrianis Wrote: .... spaces at the end of the curly brace does not matter, you can pretty much stick extra white space wherever you like.

You are missing the closing brace '}' at the end of the 'wakeup' function
If i'm correct, the error was supposed to be at Line 18, as there are no closing brace. So, the problem was two! Da Fuq?!

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 02-21-2013, 02:12 PM by PutraenusAlivius.)
02-21-2013, 02:03 PM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#8
RE: Scripting Error: Unexpected End In Script Please Help!

Because the error is 'Unexpected End of file', is does not properly capture on which line the actual problem is, it just captures the line at which the script ends. Makes it a little harder to find, but the problem is almost always going to be a missing brace somewhere.

Quote: So, the problem was two!
Not really sure what you mean by that, sorry. There only seems to be one problem with that script

02-21-2013, 02:22 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#9
RE: Scripting Error: Unexpected End In Script Please Help!

(02-21-2013, 02:22 PM)Adrianis Wrote: Because the error is 'Unexpected End of file', is does not properly capture on which line the actual problem is, it just captures the line at which the script ends. Makes it a little harder to find, but the problem is almost always going to be a missing brace somewhere.

Quote: So, the problem was two!
Not really sure what you mean by that, sorry. There only seems to be one problem with that script
First one, missing brace
Second one, Unexpected END of file.
This could mean when the second one is finished, the first one will show up. LOL your number of posts. 314. Also known as Pi (Pi is 3.14159265359 or 3.14 x 100 = 314)

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 02-21-2013, 03:07 PM by PutraenusAlivius.)
02-21-2013, 03:05 PM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#10
RE: Scripting Error: Unexpected End In Script Please Help!

The end of the file was unexpected, because it was expecting to find a closing brace somewhere, but it never did. The file ends, and the engine says 'WTF WHERES THE BRACE AT?!', because it did not expect it.

*will anthropomorphise game engines for ££

(This post was last modified: 02-21-2013, 03:32 PM by Adrianis.)
02-21-2013, 03:30 PM
Find




Users browsing this thread: 1 Guest(s)