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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
music error
tokugawa1 Offline
Junior Member

Posts: 37
Threads: 8
Joined: Aug 2012
Reputation: 0
#1
music error

When i launch my map i get an error that says:
main (11,1) ERR: No matching signatures to "PlayMusic(string@&in,string@&in,const bool, const double, const uint, const bool)

Here is my script:

void OnStart()
{
AddEntityCollideCallback("Player", "CheapScare", "MonsterFunction", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterFunction_two", true, 1);
AddUseItemCallback("", "key_study_1", "castle_4","UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "Music_1", "PlayMusic", true, 1);
}

void PlayMusic(string&in asParent, string &in asChild, int alState)
{
PlayMusic("", "scary.snt", true, 0.0, 2, 0, true);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0, "");
}

void MonsterFunction_two(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_4", false, true);
PlaySoundAtEntity("", "unlock_door", "castle_4", 0.0f, false);
RemoveItem("key_study_1");
}
08-20-2012, 08:20 PM
Find
lolmaster Offline
Member

Posts: 170
Threads: 9
Joined: Jul 2012
Reputation: 6
#2
RE: music error

.snt is for sounds. You cannot use PlayMusic on a sound file.


08-20-2012, 08:20 PM
Find
tokugawa1 Offline
Junior Member

Posts: 37
Threads: 8
Joined: Aug 2012
Reputation: 0
#3
RE: music error

(08-20-2012, 08:20 PM)lolmaster Wrote: .snt is for sounds. You cannot use PlayMusic on a sound file.
i changed that to "music.ogg" and i still have the same problem
08-20-2012, 08:26 PM
Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#4
RE: music error

(08-20-2012, 08:26 PM)tokugawa1 Wrote:
(08-20-2012, 08:20 PM)lolmaster Wrote: .snt is for sounds. You cannot use PlayMusic on a sound file.
i changed that to "music.ogg" and i still have the same problem
Try taking the ".ogg" away. If it doesn't work, put it back, then restart the game.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
(This post was last modified: 08-20-2012, 08:29 PM by Robby.)
08-20-2012, 08:28 PM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: music error

Read it again: http://wiki.frictionalgames.com/hpl2/amn...unds_music

PlayMusic takes only one string.

Tutorials: From Noob to Pro
(This post was last modified: 08-20-2012, 08:34 PM by Your Computer.)
08-20-2012, 08:34 PM
Website Find
tokugawa1 Offline
Junior Member

Posts: 37
Threads: 8
Joined: Aug 2012
Reputation: 0
#6
RE: music error

(08-20-2012, 08:28 PM)Nemet Robert Wrote:
(08-20-2012, 08:26 PM)tokugawa1 Wrote:
(08-20-2012, 08:20 PM)lolmaster Wrote: .snt is for sounds. You cannot use PlayMusic on a sound file.
i changed that to "music.ogg" and i still have the same problem
Try taking the ".ogg" away. If it doesn't work, put it back, then restart the game.
still not working
08-20-2012, 08:36 PM
Find
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#7
RE: music error

As YC said, "PlayMusic takes only one string", which means, you can't have two of them.

Remove the red-marked string from PlayMusic:
PlayMusic("", "scary.ogg", true, 0.0, 2, 0, true);

It should be:
PlayMusic("scary.ogg", true, 0.0, 2, 0, true);
08-20-2012, 08:43 PM
Website Find
tokugawa1 Offline
Junior Member

Posts: 37
Threads: 8
Joined: Aug 2012
Reputation: 0
#8
RE: music error

(08-20-2012, 08:34 PM)Your Computer Wrote: Read it again: http://wiki.frictionalgames.com/hpl2/amn...unds_music

PlayMusic takes only one string.
ok after doing that i can play the map (no error) but i cant hear the music
08-20-2012, 08:45 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#9
RE: music error

Your volume is set at 0, try putting it to 1.0f.

I rate it 3 memes.
08-20-2012, 08:46 PM
Find
tokugawa1 Offline
Junior Member

Posts: 37
Threads: 8
Joined: Aug 2012
Reputation: 0
#10
RE: music error

(08-20-2012, 08:46 PM)andyrockin123 Wrote: Your volume is set at 0, try putting it to 1.0f.
still not working. Well the audio file was mp3 and i changed it to .ogg does that make any difference?
08-20-2012, 08:54 PM
Find




Users browsing this thread: 3 Guest(s)