PlaySound
- Parameters
soundName string- comment
- bug
Leaks handle
soundHandle: In Jass you must set local variables that hold agents (or any child type) tonullat the end of functions to avoid reference counter leaks.- patch
1.00
- Source
- Blizzard.j (suggest an edit or discuss on Github)
- return type
nothing- Source code
function PlaySound takes string soundName returns nothing local sound soundHandle = CreateSound(soundName, false, false, true, 12700, 12700, "") call StartSound(soundHandle) call KillSoundWhenDone(soundHandle) endfunction