Frictional Games Forum (read-only)

Full Version: What´s Wrong?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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()
{

}
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");

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


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!