View Single Post
06-21-06, 03:38 PM   #1
Anarchos
A Murloc Raider
Join Date: Jan 2006
Posts: 5
PlaySoundFile, not working anymore?

Hi,..

This is a lil bit of a mod I use to notify me when my "nightfall" aura is on myself. (A warlock thing). Anyhow, as you can directly see, it simple places a text message in chat, and more importantly plays a short .wav file.

Well,.. Here recently, I'm not quite sure if it was the 1.11 patch or not, it has not been playing the sound. Nothing has changed, except I added a line or two or code for testing purposes.

Here is the code.

Code:
function NightfallProc_onLoad()
	this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS");
	DEFAULT_CHAT_FRAME:AddMessage("NightfallProc Version 1 loaded.");
end

function NightfallProc_onEvent(event)
		if (arg1 == "You gain Shadow Trance.") then			
                       DEFAULT_CHAT_FRAME:AddMessage("Testing, Next should be sound, then Nightfall!, then Sound");
                        PlaySoundFile("Interface\\AddOns\\NightfallProc\\cpi.wav");
                        DEFAULT_CHAT_FRAME:AddMessage("Nightfall!");
			PlaySoundFile("Interface\\AddOns\\NightfallProc\\cpi.wav");
		end;
end
Now the result from that code is *now* simple "Testing, Next should be sound, then Nightfall!, then Sound. (Next chat line) "Nightfall!"

With no sound played!

Two things, it worked fine before the patch, so it makes me believe that for some reason "PlaySoundFile" doesn't work?

Any ideas on how to get this working, it was a HUGE part of the way I play.

Thank you so much,
  Reply With Quote