| 
		
	
		| tokugawa1   Junior Member
 
 Posts: 37
 Threads: 8
 Joined: Aug 2012
 Reputation: 
0
 | 
			| 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 |  |  
	
		| lolmaster   Member
 
 Posts: 170
 Threads: 9
 Joined: Jul 2012
 Reputation: 
6
 | 
			| RE: music error 
 
				.snt is for sounds. You cannot use PlayMusic on a sound file.
			 
 
 |  |  
	| 08-20-2012, 08:20 PM |  |  
	
		| tokugawa1   Junior Member
 
 Posts: 37
 Threads: 8
 Joined: Aug 2012
 Reputation: 
0
 | 
			| 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 |  |  
	
		| Robby   Posting Freak
 
 Posts: 2,549
 Threads: 38
 Joined: Jun 2009
 Reputation: 
47
 | 
			| 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 |  |  
	
		| Your Computer   SCAN ME!
 
 Posts: 3,456
 Threads: 32
 Joined: Jul 2011
 Reputation: 
235
 | 
			| RE: music error 
 
 
				
(This post was last modified: 08-20-2012, 08:34 PM by Your Computer.)
 |  |  
	| 08-20-2012, 08:34 PM |  |  
	
		| tokugawa1   Junior Member
 
 Posts: 37
 Threads: 8
 Joined: Aug 2012
 Reputation: 
0
 | 
			| RE: music error 
 
				 (08-20-2012, 08:28 PM)Nemet Robert Wrote:   (08-20-2012, 08:26 PM)tokugawa1 Wrote:  Try taking the ".ogg" away. If it doesn't work, put it back, then restart the game. (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 still not working
			 |  |  
	| 08-20-2012, 08:36 PM |  |  
	
		| Mackiiboy   Member
 
 Posts: 101
 Threads: 7
 Joined: Jan 2012
 Reputation: 
11
 | 
			| 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 |  |  
	
		| tokugawa1   Junior Member
 
 Posts: 37
 Threads: 8
 Joined: Aug 2012
 Reputation: 
0
 |  |  
	| 08-20-2012, 08:45 PM |  |  
	
		| Adny   Posting Freak
 
 Posts: 1,766
 Threads: 6
 Joined: Mar 2012
 Reputation: 
173
 | 
			| 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 |  |  
	
		| tokugawa1   Junior Member
 
 Posts: 37
 Threads: 8
 Joined: Aug 2012
 Reputation: 
0
 | 
			| 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 |  |  |