Problem with Sound Effect

Started by TheJBurger, Fri 13/08/2004 22:12:19

Previous topic - Next topic

TheJBurger

Hello, I am a new comer to the forums and here's my problem.

My main character goes up to a door and a sound effect is supposed to play once he opens the door, however I keep getting an error every time.

Here's the script code for going to the door:
--------------------------------------------------------

MoveCharacterBlocking(EGO, 33, 186, 0);
PlaySound(50);   // My problem
Wait(10);
NewRoomEx(61, 75, 153); 

--------------------------------------------------------
I never hear the sound effect and once I exit the game, I always get an error like this:
Sound Sample Load Failure: Cannot Load Sound 50

The file name for the sound effect is SOUND50.wav

All of the other sound effects in the game work fine except that one, I don't know if that sound file is corrupt or ?

Can anyone help me?



CodeJunkie

I've never used sounds before, so I can't be of great help, but are you using the same sort of scripting for the other sounds (as opposed to making it play the sound with the drag-and-drop interface).  I had a problem with my MIDI in that it played but was sort of corrupted by another program I used and made it un-loopable.  Try copying ony of your other sounds and renaming to SOUND50.WAV.  You could also try adding this loop to your script in case moving to another room will cut the sound short:

while(IsSoundPlaying(50) == 1) {
Wait(1);
}

That will pause the game until the sound is finished.


TheJBurger

Well, i tried the first solution and it doesn't work.

I tried renaming a different sound effect as sound50 and it worked, so I guess the sound file is just corrupt or something.

Anyway, thanks for your help.

SMF spam blocked by CleanTalk