DestroyerX 0 Posted April 6, 2002 Hi, I have this in the 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 CfgSounds { sounds[] = { talk1, talk2, talk3 }; class talk1 { name = "talk1"; sound[] = {"talk1.ogg", db+290, 1.0}; titles[] = { }; }; class talk2 { name = "talk2"; sound[] = {"talk2.ogg", db+290, 1.0}; titles[] = { }; }; class talk3 { name = "talk3"; sound[] = {"talk3.ogg", db+290, 1.0}; titles[] = { }; }; class CfgMusic { tracks[]= { piano, light, rain }; class piano { name = "piano"; sound[] = {\music\piano.ogg, db+0, 1.0}; }; class light { name = "light"; sound[] = {\music\light.ogg, db+0, 1.0}; }; class rain { name = "rain"; sound[] = {\music\rain.ogg, db+0, 1.0}; }; <span id='postcolor'> And the sounds are working but I can't choose the music anymore! And the playmusic "rain"; command doesn't work either. I had a topic earlier of this and at that moment it worked but now not anymore Can anyone help me please? Share this post Link to post Share on other sites
KingN 251 Posted April 6, 2002 Hmmm. Have you checked that the problem isn't in the music file itself. I had that problem and it was fixed when I converted the ogg file again with 22khz and about 60kbps. Trust me, it could really help. Share this post Link to post Share on other sites
DestroyerX 0 Posted April 6, 2002 I think its not the files but the description.ext. You see, when I do the music first and after that the sounds, the music will work but the sounds dont Share this post Link to post Share on other sites
DestroyerX 0 Posted April 6, 2002 I tried some other Little things to change it, but nothing seems to work... Does anybody knows? Share this post Link to post Share on other sites
shadow 6 Posted April 7, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (DestroyerX @ April 06 2002,10:31)</td></tr><tr><td id="QUOTE">Hi, I have this in the 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 CfgSounds { sounds[] =  { talk1, talk2, talk3 }; class talk1 { name = "talk1"; sound[] = {"talk1.ogg", db+290, 1.0}; titles[] = { }; }; class talk2 { name = "talk2"; sound[] = {"talk2.ogg", db+290, 1.0}; titles[] = { }; }; class talk3 { name = "talk3"; sound[] = {"talk3.ogg", db+290, 1.0}; titles[] = { }; }; class CfgMusic { tracks[]= { piano, light, rain }; class piano { name = "piano"; sound[] = {\music\piano.ogg, db+0, 1.0}; }; class light { name = "light"; sound[] = {\music\light.ogg, db+0, 1.0}; }; class rain { name = "rain"; sound[] = {\music\rain.ogg, db+0, 1.0}; }; <span id='postcolor'> And the sounds are working but I can't choose the music anymore! And the playmusic "rain"; command doesn't work either. I had a topic earlier of this and at that moment it worked but now not anymore    Can anyone help me please?<span id='postcolor'> Add another "};" at the end of your description-file. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">class CfgMusic { tracks[]= { piano, light, rain }; class piano { name = "piano"; sound[] = {\music\piano.ogg, db+0, 1.0}; }; class light { name = "light"; sound[] = {\music\light.ogg, db+0, 1.0}; }; class rain { name = "rain"; sound[] = {\music\rain.ogg, db+0, 1.0}; }; }; <span id='postcolor'> Share this post Link to post Share on other sites
shadow 6 Posted April 7, 2002 The extra "};" at the end, tells OFP that this is the end of the file or something. If you leave it out, then OFP waits for what to come next after the "rain"-class. -Therefore class:"rain" won't work as it is incomplete. I'm no programmer, but I think this is how OFP uses that file Share this post Link to post Share on other sites
DestroyerX 0 Posted April 7, 2002 Thanks for the suggestion Shadow, but it didn't work  . This is pretty stupid, since I work quite a long time with custom music & sounds... Share this post Link to post Share on other sites
DestroyerX 0 Posted April 10, 2002 Please! Anyone?!! I tried some things but I still havent figure it out yet! Share this post Link to post Share on other sites
Dawdler 0 Posted April 10, 2002 Are you sure it isnt just that its playing with to low volume? when comparing with the sound its waaaaaaay lower Im no mission editor so I dont know... But its what I see from looking at the file. The fact that you are lacking an end bracket on CfgSounds can also have something to do with it Share this post Link to post Share on other sites
DestroyerX 0 Posted April 10, 2002 No, the deal is: You cant even pick the music-files on the Effects-tab of a trigger. Share this post Link to post Share on other sites
Dawdler 0 Posted April 10, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (DestroyerX @ April 10 2002,18:08)</td></tr><tr><td id="QUOTE">No, the deal is: You cant even pick the music-files on the Effects-tab of a trigger.<span id='postcolor'> But CfgSounds is incomplete, hence CfgMusic wont work... Try what I said, if it doesnt work, my wrong. Share this post Link to post Share on other sites
DestroyerX 0 Posted April 10, 2002 Sorry, but what do you mean exactley with Cfgsounds isnt complete n stuff? Can you be more specific please? Share this post Link to post Share on other sites
DestroyerX 0 Posted April 10, 2002 No matter, I see what you mean, I'll try it, thx Share this post Link to post Share on other sites
shadow 6 Posted April 10, 2002 I never pick my custom music from a list in the editor. I allways use the playmusic-command Share this post Link to post Share on other sites
DestroyerX 0 Posted April 10, 2002 I did what you said about the cfgsounds. And added an end-thingie at the end but the game locks up now. </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[] = Â { talk1, talk2, talk3 }; class talk1 { name = "talk1"; sound[] = {"talk1.ogg", db+290, 1.0}; titles[] = { }; }; class talk2 { name = "talk2"; sound[] = {"talk2.ogg", db+290, 1.0}; titles[] = { }; }; class talk3 { name = "talk3"; sound[] = {"talk3.ogg", db+290, 1.0}; titles[] = { }; class CfgMusic { tracks[]= { piano, light, rain }; class piano { name = "piano"; sound[] = {\music\piano.ogg, db+0, 1.0}; }; class light { name = "light"; sound[] = {\music\light.ogg, db+0, 1.0}; }; class rain { name = "rain"; sound[] = {\music\rain.ogg, db+0, 1.0}; { }; }; <span id='postcolor'> Share this post Link to post Share on other sites
Dawdler 0 Posted April 10, 2002 You did not do what I said I said it LACKED an end bracket... You removed the one it had instead change </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">class talk3 { name = "talk3"; sound[] = {"talk3.ogg", db+290, 1.0}; titles[] = { };<span id='postcolor'> To </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">class talk3 { name = "talk3"; sound[] = {"talk3.ogg", db+290, 1.0}; titles[] = { }; }; //END CLASS TALK3 }; //END CLASS CFGSOUNDS <span id='postcolor'> -EDIT- </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">class rain { name = "rain"; sound[] = {\music\rain.ogg, db+0, 1.0}; { }; };<span id='postcolor'> is also wrong, change to </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">class rain { name = "rain"; sound[] = {\music\rain.ogg, db+0, 1.0}; }; //END CLASS RAIN }; //END CLASS CFGMUSIC <span id='postcolor'> Share this post Link to post Share on other sites
DestroyerX 0 Posted April 10, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">You did not do what I said  <span id='postcolor'> Sorry, must be my English, but i'm gonna blame it on...........Aliens from space......   Ahem, Pc locks up now </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[] =  { talk1, talk2, talk3 }; class talk1 { name = "talk1"; sound[] = {"talk1.ogg", db+290, 1.0}; titles[] = { }; }; class talk2 { name = "talk2"; sound[] = {"talk2.ogg", db+290, 1.0}; titles[] = { }; }; class talk3 { name = "talk3"; sound[] = {"talk3.ogg", db+290, 1.0}; titles[] = { }; }; //END CLASS TALK3 }; //END CLASS CFGSOUNDS class CfgMusic { tracks[]= { piano, light, rain }; class piano { name = "piano"; sound[] = {\music\piano.ogg, db+0, 1.0}; }; class light { name = "light"; sound[] = {\music\light.ogg, db+0, 1.0}; }; class rain { name = "rain"; sound[] = {\music\rain.ogg, db+0, 1.0}; }; //END CLASS RAIN }; //END CLASS CFGMUSIC <span id='postcolor'> Share this post Link to post Share on other sites
DestroyerX 0 Posted April 10, 2002 Never mind, I did cclas instead of class. Thanks! I got it to work now!! Cheers! Share this post Link to post Share on other sites
Dawdler 0 Posted April 10, 2002 Well, Im glad to have been of help I also have a similar stupid (well, yours is not stupid, but obvious ) problem with my trainscript... One way of coding screws it up (really short way and easy, another makes it work (longer, though not troublesome), but they are exactly the same in principle and function... Went like this: Way1: if(COND1): DoSomethingEasy; ResetCondition Way2: if(COND1 and COND2): DoSomething1; ResetCondition if(COND1 and COND3): DoSomething2; ResetCondition if(COND1 and COND4): DoSomething3; ResetCondition if(COND1 and COND5): DoSomething4; ResetCondition Way2 works. Way1 dont. But another way, Way3 does: Way3: if(COND1 and COND2): DoSomethingEasy; ResetCondition if(COND1 and COND3): DoSomethingEasy; ResetCondition if(COND1 and COND4): DoSomethingEasy; ResetCondition if(COND1 and COND5): DoSomethingEasy; ResetCondition Any condition can be met, same result, hence it is exactly as Way1... But Way1 will NOT work (DoSomethingEasy is a merge of ...1-4, I used manual atan instead of atan2...) Everyone hates coding, dont we? Share this post Link to post Share on other sites