Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What´s Wrong?
HplGeek Offline
Junior Member

Posts: 17
Threads: 8
Joined: Sep 2011
Reputation: 0
#1
What´s Wrong?

Getting an error: Main (22, 1) : ERR : Unexpected token '{' [Image: huh.gif]

Please Help ): Have been trying to fix this for about an hour and cant find any wrongs in my script.

Thanks


////////////////////////////
// Run first time starting map
void OnStart()
{
AddTimer("FadeIn", 5, "FadeIn");
AddTimer("tmrIntro", 10.5f, "IntroMessage2");
AddTimer("tmrIntro", 21.0f, "IntroMessage3");
FadeOut(0.0f);
SetMessage("Messages", "intro1", 10.0f);
}

void IntroMessage2(string &in asTimer)
{
SetMessage("Messages", "intro2", 10.0f);
}

void IntroMessage3(string &in asTimer)
{
SetMessage("Messages", "intro3", 10.0f);
}
void FadeIn(string &in asTimer);
{
FadeIn(3.0f);
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}
////////////////////////////
// Run when leaving map
void OnLeave()
{

}
09-16-2011, 04:04 PM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#2
RE: What´s Wrong?

Only issue I can see is you're adding two timers at once with the same name. Try changing the timer names to, say

AddTimer("FadeIn", 5, "FadeIn");
AddTimer("tmrIntro1", 10.5f, "IntroMessage2");
AddTimer("tmrIntro2", 21.0f, "IntroMessage3");

09-16-2011, 05:15 PM
Find
GreyFox Offline
Member

Posts: 162
Threads: 23
Joined: Jul 2011
Reputation: 2
#3
RE: What´s Wrong?

void FadeIn(string &in asTimer);

Get Rid of that Semi Colen

void FadeIn(string &in asTimer)

Thats the Only other thing I see.

-Grey Fox



Current Project
Forgotten
09-16-2011, 06:14 PM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#4
RE: What´s Wrong?

Quote: void FadeIn(string &in asTimer);

Get Rid of that Semi Colen

void FadeIn(string &in asTimer)

Thats the Only other thing I see.

-Grey Fox
That's probably it, actually....I didn't see that. Good eye, Grey Fox!
09-16-2011, 07:57 PM
Find




Users browsing this thread: 1 Guest(s)