Jump to content
Sign in to follow this  
VonNexus

Problem with adding custom music to ARMA II.

Recommended Posts

Hi,

I'm trying to make a mission with Italian Soldiers and I want to add in it the Italian Anthem as a music. To do so, I downloaded GoldWave and converted the .mp3 into .ogg. Then I created a Music folder into the mission folder and I pasted in there the .ogg file. In the description.ext I wrote this:

class CfgMusic
{
tracks[]={Music1};

class Music1
{
	name = "Music1";
	sound[] = {\music\Music1.ogg, db+40, 1.0};

};

Music1 is, of course, the name of the .ogg file.

When I try to load the mission in the editor, the game crashes and the error message shows me all the path ( you know, C:\Users\Admin and so on) till the description.ext and says "line10:/Cfg Music/: Missing '}'.

I understood that I must add a { somewhere in the description.ext but where is the line 10?

Share this post


Link to post
Share on other sites

Here is your mistake:

class CfgMusic
{
tracks[]={Music1};

class Music1
{
	name = "Music1";
	sound[] = {\music\Music1.ogg, db+40, 1.0};
       [b][color="Red"]};[/color][/b]

};

Share this post


Link to post
Share on other sites
Here is your mistake:

class CfgMusic
{
tracks[]={Music1};

class Music1
{
	name = "Music1";
	sound[] = {\music\Music1.ogg, db+40, 1.0};
       [b][color="Red"]};[/color][/b]

};

Thanks! Now I can hear the music, but for some reason it's very creepy and loud. Any hints for adjusting?

Share this post


Link to post
Share on other sites
Thanks! Now I can hear the music, but for some reason it's very creepy and loud. Any hints for adjusting?

Try manipulate with db+40 parameter (volume). Decrease number or just set this parameter to 1.0. Second parameter - pitch.

Share this post


Link to post
Share on other sites
Try manipulate with db+40 parameter (volume). Decrease number or just set this parameter to 1.0. Second parameter - pitch.

Perfect. Thanks!

Share this post


Link to post
Share on other sites

What If I want to add several tracks? Could anyone write the right syntax? Because it gives me an error . It says that in line 14 there's a } instead of =.

Share this post


Link to post
Share on other sites
Post your code

Here you go:

class CfgMusic
{
tracks[]={Music2};

class Music1
{
	name = "Music2";
	sound[] = {\music\Music2.ogg, db+2, 1.0};
       };

};class CfgMusic
{
tracks[]={Music3};

class Music1
{
	name = "Music3";
	sound[] = {\music\Music3.ogg, db+2, 1.0};
       };

};

Share this post


Link to post
Share on other sites

class CfgMusic
{
// List of tracks (.ogg files without the .ogg extension)
tracks[] = {music1, music2, music3, music4, music5};

// Definition for each sound
class music1
{
	name = "music1"; // Name for mission editor
	sound[] = {\music\music1.ogg, db + 0, 1.0};
	titles[] = {0, ""};
};
class music2
{
	name = "music2"; // Name for mission editor
	sound[] = {\music\music2.ogg, db + 0, 1.0};
	titles[] = {0, ""};
};
class music3
{
	name = "music3"; // Name for mission editor
	sound[] = {\music\music3.ogg, db + 0, 1.0};
	titles[] = {0, ""};
};
class music4
{
	name = "music4"; // Name for mission editor
	sound[] = {\music\music4.ogg, db + 0, 1.0};
	titles[] = {0, ""};
};
class music5
{
	name = "music5"; // Name for mission editor
	sound[] = {\music\music5.ogg, db + 0, 1.0};
	titles[] = {0, ""};
};
};

You have multiple cfgMusic, you only need one.

Edited by kylania

Share this post


Link to post
Share on other sites
class CfgMusic
{
// List of tracks (.ogg files without the .ogg extension)
tracks[] = {music1, music2, music3, music4, music5};

// Definition for each sound
class music1
{
	name = "music1"; // Name for mission editor
	sound[] = {\music\music1.ogg, db + 0, 1.0};
	titles[] = {0, ""};
};
class music2
{
	name = "music2"; // Name for mission editor
	sound[] = {\music\music2.ogg, db + 0, 1.0};
	titles[] = {0, ""};
};
class music3
{
	name = "music3"; // Name for mission editor
	sound[] = {\music\music3.ogg, db + 0, 1.0};
	titles[] = {0, ""};
};
class music4
{
	name = "music4"; // Name for mission editor
	sound[] = {\music\music4.ogg, db + 0, 1.0};
	titles[] = {0, ""};
};
class music5
{
	name = "music5"; // Name for mission editor
	sound[] = {\music\music5.ogg, db + 0, 1.0};
	titles[] = {0, ""};
};
};

You have multiple cfgMusic, you only need one.

TY Guys! You're really my angels!

I pasted your code in my description.ext (needed only 2 tracks so I deleted music 3,4 5 in the tracks). When I load the mission, an error states that there is a } missing on line 18.

---------- Post added at 08:52 PM ---------- Previous post was at 07:40 PM ----------

This is the code that doesn't work

class CfgMusic
{

tracks[] = {music1, music2};


class music1
{
	name = "music1"; // Name for mission editor
	sound[] = {\music\music1.ogg, db + 0, 1.0};

};
class music2
{
	name = "music2"; // Name for mission editor
	sound[] = {\music\music2.ogg, db + 0, 1.0};

};

Edited by VonNexus
Error shows up

Share this post


Link to post
Share on other sites

Missing the trailing }; at the end to close the cfgMusic block.

Remember each { needs a }; to close it. :)

Share this post


Link to post
Share on other sites
Missing the trailing }; at the end to close the cfgMusic block.

Remember each { needs a }; to close it. :)

Could you post my code corrected? Thanks.

Share this post


Link to post
Share on other sites
class CfgMusic
{

tracks[] = {music1, music2};


class music1
{
	name = "music1"; // Name for mission editor
	sound[] = {\music\music1.ogg, db + 0, 1.0};

};
class music2
{
	name = "music2"; // Name for mission editor
	sound[] = {\music\music2.ogg, db + 0, 1.0};

};

[color="Red"]};[/color]

Share this post


Link to post
Share on other sites
class CfgMusic
{

tracks[] = {music1, music2};


class music1
{
	name = "music1"; // Name for mission editor
	sound[] = {\music\music1.ogg, db + 0, 1.0};

};
class music2
{
	name = "music2"; // Name for mission editor
	sound[] = {\music\music2.ogg, db + 0, 1.0};

};

[color="Red"]};[/color]

Thank you very much

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×