Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What's wrong with my script?
Author Message
willochill Offline
Member

Posts: 72
Joined: Apr 2011
Reputation: 0
Post: #1
What's wrong with my script?
I'm having a bit of trouble here- when I try to run my map it crashes and says:
main (77, 1) : ERR :Unexpected end of file
This seems strange to me because I looked over my entire script and saw nothing left unended, no open brackets without a close, nothing.
Here's the script:
void OnStart(){FadeOut(0);AddTimer("TimerFirstLook", 3, "FirstLook);SetPlayerActive(false);SetPlayerCrouching(true);FadePlayerRollTo(-90, 1000, 1000);}
void FirstLook (string &in asTimer){FadeIn(3);AddTimer("TimerFadeOut01", 6, "FadeOut01");AddTimer("TimerSecondLook", 12, "SecondLook");}
void FadeOut01(string &in asTimer){FadeOut(3);}
void SecondLook(string &in asTimer){FadeIn(3);AddTimer("TimerLook_01", 3, "Look01");AddTimer("TimerLook_02", 4.5, "Look02");AddTimer("TimerLook_03", 5.5, "Look03");AddTimer("TimerLookBack", 7.5, "LookBack");}
void Look01(string &in asTimer){StartPlayerLookAt("AreaLook01", 1, 1, "");}
void Look02(string &in asTimer){StopPlayerLookAt();StartPlayerLookAt("AreaLook02", 1, 1, "");}
void Look03(string &in asTimer){StopPlayerLookAt();StartPlayerLookAt("AreaLook03", 1, 1, "");}
void LookBack(string &in asTimer){StopPlayerLookAt();StartPlayerLookAt("AreaLookBack", 1, 1, "");FadeOut(3);AddTimer("TimerGetUp", 5, "GetUp")}
void GetUp(string &in asTimer){StopPlayerLookAt();FadeIn(3);AddTimer("TimerTurnHead," 3, "TurnHead",);AddTimer("TimerActivatePlayer", 6, "ActivatePlayer");}
void TurnHead(string &in asTimer){FadePlayerRollTo(90, 80, 90);}
void ActivatePlayer(string &in asTimer){SetPlayerActive(true);}
05-06-2012 09:39 PM
Find all posts by this user Quote this message in a reply
Xanthos Offline
Senior Member

Posts: 322
Joined: Mar 2012
Reputation: 8
Post: #2
RE: What's wrong with my script?
Can't really see the script

05-06-2012 09:57 PM
Find all posts by this user Quote this message in a reply
willochill Offline
Member

Posts: 72
Joined: Apr 2011
Reputation: 0
Post: #3
RE: What's wrong with my script?
Here, for some reason the code got all jumbled:

void OnStart()
{
FadeOut(0);
AddTimer("TimerFirstLook", 3, "FirstLook);
SetPlayerActive(false);
SetPlayerCrouching(true);
FadePlayerRollTo(-90, 1000, 1000);
}

void FirstLook (string &in asTimer)
{
FadeIn(3);
AddTimer("TimerFadeOut01", 6, "FadeOut01");
AddTimer("TimerSecondLook", 12, "SecondLook");
}

void FadeOut01(string &in asTimer)
{
FadeOut(3);
}

void SecondLook(string &in asTimer)
{
FadeIn(3);
AddTimer("TimerLook_01", 3, "Look01");
AddTimer("TimerLook_02", 4.5, "Look02");
AddTimer("TimerLook_03", 5.5, "Look03");
AddTimer("TimerLookBack", 7.5, "LookBack");
}


void Look01(string &in asTimer)
{
StartPlayerLookAt("AreaLook01", 1, 1, "");
}

void Look02(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("AreaLook02", 1, 1, "");
}

void Look03(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("AreaLook03", 1, 1, "");
}

void LookBack(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("AreaLookBack", 1, 1, "");
FadeOut(3);
AddTimer("TimerGetUp", 5, "GetUp");
}

void GetUp(string &in asTimer)
{
StopPlayerLookAt();
FadeIn(3);
AddTimer("TimerTurnHead," 3, "TurnHead",);
AddTimer("TimerActivatePlayer", 6, "ActivatePlayer");
}

void TurnHead(string &in asTimer)
{
FadePlayerRollTo(90, 80, 90);
}

void ActivatePlayer(string &in asTimer)
{
SetPlayerActive(true);
}

void OnEnter()
{
}

void OnLeave()
{
}
05-06-2012 09:59 PM
Find all posts by this user Quote this message in a reply
BeeKayK Offline
Posting Freak

Posts: 1,933
Joined: Mar 2012
Reputation: 73
Post: #4
RE: What's wrong with my script?
You forgot quotation in fourth line, "firstlook"

What happens when two mind readers read each others mind?
Do they get... mindblown? BADAM TSH!
05-06-2012 10:05 PM
Find all posts by this user Quote this message in a reply
willochill Offline
Member

Posts: 72
Joined: Apr 2011
Reputation: 0
Post: #5
RE: What's wrong with my script?
okay, now it's crashing and saying "Expected ')' or ','" Again I cannot find anything wrong.
Here's the updated version of the script:

void OnStart()
{
FadeOut(0);
AddTimer("TimerFirstLook", 3, "FirstLook");
SetPlayerActive(false);
SetPlayerCrouching(true);
FadePlayerRollTo(-90, 1000, 1000);
}

void FirstLook (string &in asTimer)
{
FadeIn(3);
AddTimer("TimerFadeOut01", 6, "FadeOut01");
AddTimer("TimerSecondLook", 12, "SecondLook");
}

void FadeOut01(string &in asTimer)
{
FadeOut(3);
}

void SecondLook(string &in asTimer)
{
FadeIn(3);
AddTimer("TimerLook_01", 3, "Look01");
AddTimer("TimerLook_02", 4.5, "Look02");
AddTimer("TimerLook_03", 5.5, "Look03");
AddTimer("TimerLookBack", 7.5, "LookBack");
}


void Look01(string &in asTimer)
{
StartPlayerLookAt("AreaLook01", 1, 1, "");
}

void Look02(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("AreaLook02", 1, 1, "");
}

void Look03(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("AreaLook03", 1, 1, "");
}

void LookBack(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("AreaLookBack", 1, 1, "");
FadeOut(3);
AddTimer("TimerGetUp", 5, "GetUp");
}

void GetUp(string &in asTimer)
{
StopPlayerLookAt();
FadeIn(3);
AddTimer("TimerTurnHead," 3, "TurnHead");
AddTimer("TimerActivatePlayer", 6, "ActivatePlayer");
}

void TurnHead(string &in asTimer)
{
FadePlayerRollTo(90, 80, 90);
}

void ActivatePlayer(string &in asTimer)
{
SetPlayerActive(true);
}

void OnEnter()
{
}

void OnLeave()
{
}
05-06-2012 10:13 PM
Find all posts by this user Quote this message in a reply
BeeKayK Offline
Posting Freak

Posts: 1,933
Joined: Mar 2012
Reputation: 73
Post: #6
RE: What's wrong with my script?
No sorry.. Can't find it.. But it must be there somewhere Wink

What happens when two mind readers read each others mind?
Do they get... mindblown? BADAM TSH!
05-06-2012 10:25 PM
Find all posts by this user Quote this message in a reply
Xanthos Offline
Senior Member

Posts: 322
Joined: Mar 2012
Reputation: 8
Post: #7
RE: What's wrong with my script?
What does the error say?
Like main(15,6)
That tells us where to find the error.

05-06-2012 10:33 PM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,236
Joined: Jul 2011
Reputation: 216
Post: #8
RE: What's wrong with my script?
GetUp :: AddTimer, comma within string.

Tutorials: From Noob to Pro
05-06-2012 10:42 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)