- Joined
- Mar 24, 2013
- Messages
- 1,105
Hello, I'm using the below function to create an error message but its not playing the sound, From my limited JASS knowledge it appears to me that the sound is created and stored on initialization. However, its not working so maybe I'm supposed to be doing something else to create/store the sound?
Edit: I triple checked my sound, so I am certain that is not the problem
JASS:
library SimError
//==================================================================================================
globals
private sound error
endglobals
//====================================================================================================
function SimError takes player ForPlayer, string msg returns nothing
set msg="\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n|cffffcc00"+msg+"|r"
if (GetLocalPlayer() == ForPlayer) then
call ClearTextMessages()
call DisplayTimedTextToPlayer( ForPlayer, 0.52, 0.96, 2.00, msg )
call StartSound( error )
endif
endfunction
private function init takes nothing returns nothing
set error = CreateSoundFromLabel("InterfaceError", false, false, false, 10,10)
endfunction
endlibrary
Edit: I triple checked my sound, so I am certain that is not the problem