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


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script error: no matching signatures
Author Message
Wapez Offline
Senior Member

Posts: 352
Joined: Mar 2012
Reputation: 18
Post: #1
Script error: no matching signatures

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

Founder & Legally Accountable Publisher of Frunken Productions.
Environment & Gameplay Designer and Scripter.
http://frunkenproductions.com/
(This post was last modified: 04-12-2012 06:38 PM by Your Computer.)
04-12-2012 05:52 PM
Find all posts by this user Quote this message in a reply
ClayPigeon Offline
Member

Posts: 211
Joined: Mar 2012
Reputation: 8
Post: #2
RE: Please check the troubleshooting guides before posting!

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.
04-12-2012 06:20 PM
Find all posts by this user Quote this message in a reply
Wapez Offline
Senior Member

Posts: 352
Joined: Mar 2012
Reputation: 18
Post: #3
RE: Please check the troubleshooting guides before posting!

(04-12-2012 06:20 PM)ClayPigeon Wrote:  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.
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.

Founder & Legally Accountable Publisher of Frunken Productions.
Environment & Gameplay Designer and Scripter.
http://frunkenproductions.com/
04-12-2012 06:37 PM
Find all posts by this user Quote this message in a reply
Putmalk Offline
Senior Member

Posts: 291
Joined: Apr 2012
Reputation: 15
Post: #4
RE: Script error: no matching signatures

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

(This post was last modified: 04-12-2012 07:30 PM by Putmalk.)
04-12-2012 07:28 PM
Find all posts by this user Quote this message in a reply
Post Reply 




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