Jump to content

playSound() problem :D


Recommended Posts

Hi all.

I'm having troubles with doing a check to know if playSound() worked or didn't.

Here you have a wrong example of what I want to do: (When I use the following example, it's always showing me "It works fine", doesn't matter if the 1st playSound worked or not)

local mapMusic = playSound("music1.mp3") 
if not (mapMusic) then 
local radioMusic = playSound("music2.mp3") 
outputChatBox ( "It works fine") 

Link to comment
Not entirely sure, but playSound may return a sound element even if the URL is incorrect, or the file is inaccessible. Check your client console (F8) after the playSound has executed, it will show any errors.

BASS ERROR 0 in PlayStream  b3D = false  path = music.mp3 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...