![]() |
Script error: no matching signatures - 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: Script error: no matching signatures (/thread-14735.html) |
Script error: no matching signatures - Wapez - 04-12-2012 Hey i get an error when i try my map what's wrong? //=========================================== //=========================================== // This runs when the map first starts void OnStart() { FadeOut(0); FadeIn(10); } //=========================================== // This runs when the player enters the map void OnEnter() { StopMusic(0,1); PlayMusic("requiem_for_a_dream.ogg", false, 1, 3, 0); } //=========================================== // This runs when the player leaves the map void OnLeave() { } RE: Please check the troubleshooting guides before posting! - ClayPigeon - 04-12-2012 You're missing an argument on the PlayMusic function. 1 2 3 4 5 PlayMusic("requiem_for_a_dream.ogg", false, 1, 3, 0); 1 2 3 4 5 6 PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume); You're missing the bool abResume part. Set it to false/true. RE: Please check the troubleshooting guides before posting! - Wapez - 04-12-2012 (04-12-2012, 06:20 PM)ClayPigeon Wrote: You're missing an argument on the PlayMusic function.Now I did this: //=========================================== //=========================================== // This runs when the map first starts void OnStart() { FadeOut(0); FadeIn(10); } //=========================================== // This runs when the player enters the map void OnEnter() { StopMusic(0,1); PlayMusic("requiem_for_a_dream.ogg", false, 1, 3, true 0); } //=========================================== // This runs when the player leaves the map void OnLeave() { } I got another error that said: Expected ')' or ','. I tried to put i tlike this: PlayMusic("requiem_for_a_dream.ogg", false, 1, 3, true, 0); But that would only give me an error too. RE: Script error: no matching signatures - Putmalk - 04-12-2012 Nevermind, I missed it, hang on one sec... The last two arguments of the PlayMusic function are reversed. It should be: PlayMusic("requiem_for_a_dream.ogg", false, 1, 3, 0, true); |