Jump to content
Sign in to follow this  
Ex-RoNiN

Description.ext and multiple radio messages

Recommended Posts

Hi, I have several radio messages in my mission that I want to use, but I'm not sure what the description.ext is supposed to look like. What I have (and causes a crash to desktop) is the following:

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

class CfgRadio

{

sounds[] = {test1};

class test4

{

name = "";

sound[] = {"\sounds\test1.ogg", db+0, 1.0};

title = $STRM_test1;

};

sounds[] = {test2};

class test2

{

name = "";

sound[] = {"\sounds\test2.ogg", db+0, 1.0};

title = $STRM_test2;

};

sounds[] = {test3};

class test3

{

name = "";

sound[] = {"\sounds\test3.ogg", db+0, 1.0};

title = $STRM_test3;

};

sounds[] = {test4};

class test4

{

name = "";

sound[] = {"\sounds\test4.ogg", db+0, 1.0};

title = $STRM_test4;

};

};

<span id='postcolor'>

This causes a crash to desktop with the message "Member allready defined." I don't know much about Object-oriented programming (old-fashioned ANSI-C person here ), so what am I doing wrong?

Share this post


Link to post
Share on other sites

For multiple sounds, I always use a different description.ext. confused.gif  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 CfgSounds

{

sounds[] =  {

test1, test2, test3, test4

};

class test1

{

 name = "test1";

 sound[] = {"test1.ogg", db+290, 1.0};

 titles[] =

 {

 };

};

class test2

{

name = "test2";

sound[] = {"test2.ogg", db+290, 1.0};

titles[] =

{

};

};

class test3

{

 name = "test3";

 sound[] = {"test3.ogg", db+290, 1.0};

 titles[] =

 {

 };

};

class test4

{

 name = "test4";

 sound[] = {"test4.ogg", db+290, 1.0};

 titles[] =

 {

 };

};

<span id='postcolor'>

Hope this worked, let me know if it doesn't. smile.gif

Share this post


Link to post
Share on other sites

"Member allready defined" Means that you have used the same class twice.

In your case it is test4 you have used twice.

RED

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 (RED @ June 07 2002,21:29)</td></tr><tr><td id="QUOTE">"Member allready defined" Means that you have used the same class twice.

In your case it is test4 you have used twice.

RED<span id='postcolor'>

nope, that wasn't it, i changed it and it still gave me the same error. i will try the solution DestroyerX suggested and brb smile.gif

Share this post


Link to post
Share on other sites

Did you change one of the "class test4" lines to "class test1" that should of fixed it.

RED

Share this post


Link to post
Share on other sites

wow.gif7--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (RED @ June 07 2002,22wow.gif7)</td></tr><tr><td id="QUOTE">Did you change one of the "class test4" lines to "class test1" that should of fixed it.

RED<span id='postcolor'>

Yes, but that wasn't it. I used DestroyerX's code sample, and it sort of works. With this I mean that it doesn't crash anymore, and that the program seems to be able to find the files (i had to change the directory for each file).

Now, I have created a unit, and put in its init field

this setidentity HQ

THen I have a trigger that eventually gets activated. In its activation field I put

HQ sideRadio "'test4'"

but nothing happens. Do I have to start with test1 or am I doing something else wrong?

EDIT: By the way, the idea is to have radio text test4 spoken by HQ.

Share this post


Link to post
Share on other sites

You have to name the unit say off1

Then use:

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

RED

Share this post


Link to post
Share on other sites

argh, now it says "file not found" mad.gif

WHere else could I be making mistakes sad.gifmad.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 (RED @ June 08 2002,08:53)</td></tr><tr><td id="QUOTE">Make sure you called the folder "sound" not "sounds"

Also I made a tutorial ages ago for this,

http://www.militarygameronline.com/OFPRED/tutorials/voice.asp

Check it out if you want.

RED<span id='postcolor'>

I don't see how this could be a problem, I gave the full path, ie.

\sounds\test4.ogg

confused.gif

Share this post


Link to post
Share on other sites

Ok, this shite thing doesn't want to work. DestroyerX, you said you use multiple description.ext's for multiple sounds? How do you do that? (others are invited to answer that as well smile.gif )

Share this post


Link to post
Share on other sites

No you don't need to use multiple .ext files for that.

What would be the point when you can do it all in one?

I suggest you try and get one file to work before you try and get multiple to work.

When I was first trying to get sounds to work it was hell.

If you made a mistake or the game could not find the file it would crash to desktop tounge.gif

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">I don't see how this could be a problem, I gave the full path, ie.

\sounds\test4.ogg<span id='postcolor'>

Well the default sound DIR is sound so why use another one?

Also I can't back this up but, maybe because the sounds DIR is the default then maybe it is looking for the file in the DIR

sound\sounds\test4.ogg

Just an idea.

RED

Share this post


Link to post
Share on other sites

wow.gif3--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Ex-RoNiN @ June 08 2002,16wow.gif3)</td></tr><tr><td id="QUOTE">Ok, this shite thing doesn't want to work. DestroyerX, you said you use multiple description.ext's for multiple sounds? How do you do that? (others are invited to answer that as well smile.gif )<span id='postcolor'>

Sorry, I didn't mean that I was using more than 1 description.ext confused.gif  I can't see the problem either, try what RED said.

Share this post


Link to post
Share on other sites

the formatting is hard to follow in this but I think you have more opening brackets than closing brackets... could be your error

Share this post


Link to post
Share on other sites

Hey, best thing for sound in my opinion is the sound utility. It can be found under editing apps at ofpec.

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 (SFG @ June 10 2002,16:53)</td></tr><tr><td id="QUOTE">Hey, best thing for sound in my opinion is the sound utility. It can be found under editing apps at ofpec.<span id='postcolor'>

Excellent idea. I'll have a look, although it has been sorted mostly smile.gif Thanks smile.gif

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  

×