Ex-RoNiN 0 Posted June 7, 2002 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
DestroyerX 0 Posted June 7, 2002 For multiple sounds, I always use a different description.ext. Â 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. Share this post Link to post Share on other sites
RED 0 Posted June 7, 2002 "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
Ex-RoNiN 0 Posted June 7, 2002 </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 Share this post Link to post Share on other sites
RED 0 Posted June 7, 2002 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
Ex-RoNiN 0 Posted June 7, 2002 7--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (RED @ June 07 2002,227)</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
RED 0 Posted June 7, 2002 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
Ex-RoNiN 0 Posted June 7, 2002 argh, now it says "file not found" WHere else could I be making mistakes Share this post Link to post Share on other sites
RED 0 Posted June 8, 2002 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 Share this post Link to post Share on other sites
Ex-RoNiN 0 Posted June 8, 2002 </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 Share this post Link to post Share on other sites
Ex-RoNiN 0 Posted June 8, 2002 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 ) Share this post Link to post Share on other sites
RED 0 Posted June 8, 2002 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 </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
DestroyerX 0 Posted June 8, 2002 3--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Ex-RoNiN @ June 08 2002,163)</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 )<span id='postcolor'> Sorry, I didn't mean that I was using more than 1 description.ext  I can't see the problem either, try what RED said. Share this post Link to post Share on other sites
Ex-RoNiN 0 Posted June 8, 2002 the directory wasnt the problem Share this post Link to post Share on other sites
Deadpuppy 0 Posted June 9, 2002 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
SFG 1 Posted June 10, 2002 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
Ex-RoNiN 0 Posted June 10, 2002 </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 Thanks Share this post Link to post Share on other sites