* Translator


Author Topic: [Fixed]Sound Error - Couldn't load stream - Unable to open file  (Read 1289 times)

#FNRP#Gabb

  • Mapper / Modder
  • **
  • Posts: 44
  • Country: mt
  • Respect: 4
For some reason, I can't put music in my new map, I tried using different .mp3 files or .wav files, I tried completely remaking the whole map, still didn't work.

These are the steps I have done.

I got the music file which is named lenka.mp3, I put it in a folder called 'sound' then I created the .iwd file called mp_dr_stormyascent (my map name). I put the .iwd file in a folder mp_dr_stormyascent in the folder usermaps.

In the .gsc file I have the following:

Spoiler for Hiden:
main(){
   maps\mp\_load::main();
   
   game["allies"] = "marines";
   game["axis"] = "opfor";
   game["attackers"] = "axis";
   game["defenders"] = "allies";
   game["allies_soldiertype"] = "desert";
   game["axis_soldiertype"] = "desert";
   
   thread music();
}

music(){
    level waittill( "round_started" );   
    wait 1;   
    ambientPlay( "bgmusic1" );
}

In the .csv file I have:
Spoiler for Hiden:
name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max??,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,second?a?ryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage,center percentage,platform,envelop_min,envelop_max,envelop percentage
,,,,,,,,,,,,,,,,,,,,,,,,,,,,
bgmusic1,,lenka.mp3,1,1,,,,1000000,,announcer,streamed,,,master,,,,,,,,,,,,,,

I have put these in the zone file:
Spoiler for Hiden:
sound,mp_dr_stormyascent,mp_dr_stormyascent,all_mp
sound,mp_dr_stormyascent,,all_mp

I compiled and rebuild fast files and when I start the map and the round starts I get the following error:
Couldn't play stream 'sound/\lenka.mp3' from alias 'bgmusic1' - Unable to open file

I have also tried putting the .mp3 file in a folder called music or sound and changing the .csv file to music/lenka.mp3 or sound/lenka.mp3 and it still didn't work and just gave the same error:
Couldn't play stream 'sound/music\lenka.mp3' from alias 'bgmusic1' - Unable to open file or
Couldn't play stream 'sound/sound\lenka.mp3' from alias 'bgmusic1' - Unable to open file

Any help would be appreciated, been trying to fix it for 2 days. I have looked and looked at people with the same error and tried everything but nothing is working. I am pretty sure I did the same steps for my other map and it worked then, so I have no idea why it is not working now.

Fix(for those with the same problem):

It had something to do with the .iwd file, I copied and pasted the .iwd file of my old map mp_dr_harrypotter and changed the music files inside it and renamed it, and it worked.

So if u have the same problem get a map that you know works, then just copy and rename it in your usermaps folder. Also, when saving the .iwd file make sure you select ZIP not RAR, because I think that was the problem.

Thanks to Phelix for the help.
« Last Edit: June 25, 2016, 01:58:25 PM by Gabb »
Steam: Gabb(Same pic as Avatar)
Bnet: Gabb#2215

 

SimplePortal 2.3.7 © 2008-2022, SimplePortal