Code
function SimError takes player ForPlayer, string msg returns nothing
local sound s = CreateSoundFromLabel("InterfaceError",false,false,false,10,10)
if GetLocalPlayer() == ForPlayer then
call ClearTextMessages()
call DisplayTimedTextToPlayer(ForPlayer,.52,-1.,2.,"|cffffcc00"+msg+"|r")
call StartSound(s)
call KillSoundWhenDone(s)
endif
set s = null
endfunction