Author Topic: Error when loading a sound  (Read 487 times)

when I do

         %fireSound = %json.get("firesound");
         if(isFile(%firesound))
         {
            datablock AudioProfile(TF2_DummySound) {
               filename = %firesound;
               description = AudioClosest3d;
               preload = true;
            };
            TF2_DummySound.setName("TF2_" @ %id @ "_fireSound");
         }

I get
Object 'file/path/to/sound.wav'  is not a member of the 'AudioProfile' data block class
in console.
Disabling/enabling preload doesn't fix.
« Last Edit: December 18, 2013, 07:18:26 PM by 0xBRIANSMITH »

Turns out that it only breaks when the weapon is actually initialized with the sound.
Fixed
it was an issue with me using %firesound not the filename to init the stuff.
« Last Edit: December 18, 2013, 08:06:35 PM by 0xBRIANSMITH »