Jump to content
Sign in to follow this  
FSPilot

More music problems

Recommended Posts

Yes I searched, no nothing helped my question.

I've got a music folder in my mission folder with filename.ogg in there.

I've got

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">PlayMusic "filename (without the .ogg tag)"<span id='postcolor'>

in my intro.sqs file.  And

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">class CfgMusic

{

tracks[]= {filename};

class filename

{

name = "filename";

{sound[] = {\music\filename.ogg, db+0, 1.0};

};

};

};

<span id='postcolor'>

And I get the error

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">

Users\PFC Voorhees\missions\SCUDS.Noe\description.ext/CfgMusic: 'S' encountered instead of '{'<span id='postcolor'>

Help?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgMusic

{

tracks[]= {filename};

class filename

{

name = "filename";

sound[] = {\music\filename.ogg, db+0, 1.0};

};

};

<span id='postcolor'>

That should work, you had { before the sound[].

RED

Share this post


Link to post
Share on other sites

Nope, same error. sad.gif

Thanks for the reply though.

Share this post


Link to post
Share on other sites

Try this

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgMusic

{

tracks[]=

{

filename

};

class filename

{

name = "filename";

sound[] = {\music\filename.ogg, db+0, 1.0};

};

} <span id='postcolor'>

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (FSPilot @ 01 May 2003,06:34)</td></tr><tr><td id="QUOTE">in my intro.sqs file.<span id='postcolor'>

Shouldn't it be in you description.ext file? confused.gif

Share this post


Link to post
Share on other sites

I think he has the Playmusic command in the init.sqs..... confused.gif

Otherwise, it would be a very stupid mistake, hehe smile.gif

Share this post


Link to post
Share on other sites

Oh, I see.

Anyway, your fix should work for him. He had extra brackets before the word "sound" and on the following line.

Share this post


Link to post
Share on other sites

Nope, same error.

Here's my description.ext

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgMusic

{

tracks[]=

{

William Stromberg - Russian Monster Bomb

};

class William Stromberg - Russian Monster Bomb

{

name = "William Stromberg - Russian Monster Bomb";

sound[] = {\music\William Stromberg - Russian Monster Bomb.ogg, db+0, 1.0};

};

} <span id='postcolor'>

Share this post


Link to post
Share on other sites

I would change the music file name to something short and sweet with no embedded blanks, just in case.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">

Users\PFC Voorhees\missions\SCUDS.Noe\description.ext/CfgMusic: 'S' encountered instead of '{'<span id='postcolor'>

The problem is the line "class William Stromberg - Russian Monster Bomb" in the description.ext.

Reason: the track name(s) in tracks[] and the class name(s) defining the track(s) have to be one word with no spaces -

the "description.ext interpreter" (if I may call it that) choked on the 'S' in "Stromberg" since it expects an opening curly brace there instead. Try this one:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgMusic

{

  tracks[]= {wsrmbomb};

  class wsrmbomb {

     name = "William Stromberg - Russian Monster Bomb";

     sound[] = {\music\William Stromberg - Russian Monster bomb.ogg, db+0, 1.0};

  };

};

<span id='postcolor'>

And then use

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">playMusic "wsrmbomb"<span id='postcolor'>

To play it. Note how the parameter to playMusic is the "track class name", not the file name of the .ogg file, nor what you have in the name= property.

Note: it may be possible to have a long-winded track class name like William_Stromberg_Russan_Monster_Bomb. Haven't tried it, though.

Share this post


Link to post
Share on other sites

*sniff*

that song never sounded so beautiful

smile.gif thanks guys, it's working. i'll mention you guys in the readme as this intro is pretty boring without the music biggrin.gif

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (FSPilot @ 02 May 2003,08:35)</td></tr><tr><td id="QUOTE">i'll mention you guys in the readme<span id='postcolor'>

Seems I'm to be left out. sad.gifsad.gifsad.gif

wink.gif

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (theavonlady @ 02 May 2003,08:33)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (FSPilot @ 02 May 2003,08:35)</td></tr><tr><td id="QUOTE">i'll mention you guys in the readme<span id='postcolor'>

Seems I'm to be left out. sad.gif  sad.gif  sad.gif

wink.gif<span id='postcolor'>

It's funny when chicks try to do stuff....

hehehe

tounge.gif

jk

Share this post


Link to post
Share on other sites

OK, here's the deal. I decided to change the music that I was going to use in the intro (the song I had picked was considerably shorter than the intro and I didn't want to mess around with it to fit them together). I found a song that fits the intro perfectly, to the second. so I changed all the names in the description.ext and intro.sqs accordingly, didn't work. tried a bunch of other things, didn't work. I typed up a big post here about it, but then decided to give it another try. i closed the .ext and .sqs files and voila, it worked. crazy.gifwow.gif

What happened?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (FSPilot @ 03 May 2003,16:57)</td></tr><tr><td id="QUOTE">OK, here's the deal.  I decided to change the music that I was going to use in the intro (the song I had picked was considerably shorter than the intro and I didn't want to mess around with it to fit them together).  I found a song that fits the intro perfectly, to the second.  so I changed all the names in the description.ext and intro.sqs accordingly, didn't work.  tried a bunch of other things, didn't work.  I typed up a big post here about it, but then decided to give it another try.  i closed the .ext and .sqs files and voila, it worked. crazy.gifwow.gif

What happened?<span id='postcolor'>

when u put a ogg file into music folder u need to reload the mission. That is: Close the mission and reload it again, or the music wont play

Share this post


Link to post
Share on other sites

Whenever you make a change to the description.ext file you need to save the mission, this will reload the files.

RED

Share this post


Link to post
Share on other sites

While we're on about music problems I'm using this typing script that shows the words being typed across the screen during my intro for my mission but I want a beep to play for every change in the text just like in the movies. So far I've been able to make the text look like its being typed but I can't seem to get the dang thing to beep. If you take a look at what I'm doing you can see that I'm using the (playsound "beep") code in my words.sqs file but the beeps are just not going off. If you help me and it works, I'll tell you about it.

playsound "beep"

TitleText["|","PLAIN DOWN",0.1]

~0.15

playsound "beep"

TitleText["|","PLAIN DOWN",0.1]

~0.15

playsound "beep"

TitleText["|","PLAIN DOWN",0.1]

~0.15

playsound "beep"

TitleText["2|","PLAIN DOWN",0.1]

~0.15

playsound "beep"

TitleText["21|","PLAIN DOWN",0.1]

~0.15

playsound "beep"

TitleText["210|","PLAIN DOWN",0.1]

~0.15

playsound "beep"

TitleText["2100|","PLAIN DOWN",0.1]

~0.15

playsound "beep"

TitleText["2100 W|","PLAIN DOWN",0.1]

~0.15

playsound "beep"

TitleText["2100 We|","PLAIN DOWN",0.1]

~0.15

Share this post


Link to post
Share on other sites

Are you sure that the 'beep' sound is actually playing? I had a problem once that a file size was too small and as the .ogg encoder I used cut a few seconds off the file the sound never worked.

To solve this problem I just added a little bit of silence on the file and it worked fine. This doesn't happen with a more recent codec, but if you are using a old one it may.

RED

Share this post


Link to post
Share on other sites

Just FYI, I've completed the mission (and intro). If you're interested it's under "I need a beta tester..." in the user missions forum. Complete with music. smile.gif Thanks guys.

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  

×