OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: NightJay0044 on 28 Feb 2009, 02:35:17

Title: Why wont my sound file work?
Post by: NightJay0044 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.

Title: Re: Why wont my sound file work?
Post by: Worldeater 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! :)
Title: Re: Why wont my sound file work?
Post by: NightJay0044 on 28 Feb 2009, 05:57:32
Thanks, it works now,  :)
Title: Re: Why wont my sound file work?
Post by: hoz 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.