• Playing a non 3D sound with volume?
    0 replies, posted
I'm using this code client side [CODE] sound.PlayFile( file, "", function( playing, error_id, error_name ) if ( error_id ) then debug.infoln( "(" .. error_id .. ") " .. error_name, "SOUND" ) surface.PlaySound( file ) end if ( IsValid( playing ) ) then playing:SetVolume( 1 ) playing:Play() else debug.infoln( "Unable to play sound! Sound element not valid!", "SOUND" ) end end ) [/CODE] I've tried passing it the sound file itself ( it's a 16-bit 41 kHz wav file ) and also tried passing it the sound name ( the name given the file using sound.Add() ) . When it defaults back to surface.PlaySound() the sound works. But the sound.PlayFile() it gives me error code 2 BASS_ERROR_FILEOPEN. Anyone know how to fix this? Did I do something wrong? EDIT: Found out whats wrong with my code, the mounting is different, have to include the "sound/" directory :D
Sorry, you need to Log In to post a reply to this thread.