Home   Help Search Login Register  

Author Topic: Why wont my sound file work?  (Read 1087 times)

0 Members and 1 Guest are viewing this topic.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Why wont my sound file work?
« on: 28 Feb 2009, 02:35:17 »
Hi all, I'm having this problem again. I've presented this in the past too, but now it's doing it again.

This is what i have in my "Description" file:

Quote
class CfgSounds
{
sounds[] = { S1, };
class S1
{
name = "S1";
sound[] = {"S1.ogg", db+20, 1.0};
titles[] =
{
0, $STRM_S1
};
};

My sound folder is named "Sound" with and .ogg file of "S1".

I go in the editor, and I simply type this command.

Quote
E1 say "S1"

Error says sound file not found.   LIke it's not there, what am I doing wrong again?

Thanks.

Who's hyped for Arma4, long live Arma!

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: Why wont my sound file work?
« Reply #1 on: 28 Feb 2009, 03:22:47 »
Uhm... 1) there is a curly bracket missing at the end and 2) you did not specify the path to the sound file. It should look like this:

Code: [Select]
class CfgSounds
{
    sounds[] = { S1 };
    class S1
    {
        name = "S1";
        sound[] = { "\Sound\S1.ogg", db+20, 1.0 };
        titles[] = { 0, $STRM_S1 };
    };
};


Note: if you cut'n'paste this check your curly brackets! :)
« Last Edit: 28 Feb 2009, 03:24:54 by Worldeater »
try { return true; } finally { return false; }

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: Why wont my sound file work?
« Reply #2 on: 28 Feb 2009, 05:57:32 »
Thanks, it works now,  :)
Who's hyped for Arma4, long live Arma!

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Why wont my sound file work?
« Reply #3 on: 28 Feb 2009, 20:59:46 »
Just a pro tip, if you use a more powerful editor then notepad like notepad++ (many others), they will highlight the opening and closing brackets as you hover over them. This can save you lots of time and less errors.
Xbox Rocks