Frictional Games Forum (read-only)
What´s Wrong? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: What´s Wrong? (/thread-10349.html)



What´s Wrong? - HplGeek - 09-16-2011

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

}


RE: What´s Wrong? - Obliviator27 - 09-16-2011

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




RE: What´s Wrong? - GreyFox - 09-16-2011

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





RE: What´s Wrong? - Obliviator27 - 09-16-2011

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!