Quantcast WoWInterface - View Single Post - PlaySoundFile issue
View Single Post
08-20-19, 04:22 PM   #4
Brellison94
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2013
Posts: 36
Originally Posted by myrroddin View Post
Yes. You need to use the numeric value for sound kits, not the strings.

https://www.townlong-yak.com/framexm...tConstants.lua
Code:
PlaySoundFile(120) -- new
PlaySoundFile(LOOT_WINDOW_COIN_SOUND) -- old
Current Code:
Code:
if button == "LeftButton" then
			PlaySoundFile("Sound\\Creature\\"..BossTalk.data[tonumber(strsub(link, 5))].sound..".ogg")
			UIErrorsFrame:AddMessage(BossTalk.data[tonumber(strsub(link, 5))].text, 1.0, 0.2, 0.2, 1, 5);
			BossTalk:SendMessage(BossTalk.data[tonumber(strsub(link, 5))].boss,BossTalk.data[tonumber(strsub(link, 5))].sound,"normal")
			return;
		else
			BossTalk.searchcmd = { type='group', args = { welcha = {	type = 'header', name = "|cff00ff00#"..strsub(link, 5)..":|r |cffffff00"..strsub(BossTalk.data[tonumber(strsub(link, 5))].text,1,20).."...\n|r", order = 3, },
			playsound = { type = 'execute', name = 	L["Play sound"], desc = " ", func = function() PlaySoundFile("Sound\\Creature\\"..BossTalk.data[tonumber(strsub(link, 5))].sound..".ogg"); UIErrorsFrame:AddMessage(BossTalk.data[tonumber(strsub(link, 5))].text, 1.0, 0.2, 0.2, 1, 5); BossTalk:SendMessage(BossTalk.data[tonumber(strsub(link, 5))].boss,BossTalk.data[tonumber(strsub(link, 5))].sound,"normal"); end, order = 5,}, 
			addfav = { type = 'execute', name = 	L["Add to favorites"], desc = " ", func = function() local old = BossTalk:tcount(dbd.favoriten)+1; for z=1,BossTalk:tcount(dbd.favoriten) do if dbd.favoriten[z].text == BossTalk.data[tonumber(strsub(link, 5))].text then BossTalk:Print(L["Yell is already in list!"]); return; end end dbd.favoriten[old]=BossTalk.data[tonumber(strsub(link, 5))]; BossTalk:MakeFunk(); BossTalk:Print(L["Yell added"]); end, order = 6,}, 
			addign = {type = 'execute', name = 	L["Add to ignore list"], desc = " ", func = function() for z=1,BossTalk:tcount(dbd.ignoyell) do if dbd.ignoyell[z].id == tonumber(strsub(link, 5)) then BossTalk:Print(L["Yell is already in list!"]); return; end end dbd.ignoyell[#dbd.ignoyell+1] = { ["id"] = tonumber(strsub(link, 5)), ["yell"]=BossTalk.data[tonumber(strsub(link, 5))].text, ["sound"]=BossTalk.data[tonumber(strsub(link, 5))].sound } BossTalk:MakeIgno() BossTalk:Print(L["Yell added"]) end, order = 7,},},}
			BTchat:Register("BossTalkChatFrame", 'children', function()
			BTchat:FeedAceOptionsTable(BossTalk.searchcmd) end )
			BTchat:Open("BossTalkChatFrame", 'cursorX', true, 'cursorY', true)
			BTchat:Unregister("BossTalkChatFrame")
			return;
		end (Lines 636 - 651)

PlaySoundFile("Sound\\Creature\\"..arg2..".ogg") (Line 1146)

PlaySoundFile("Sound\\Creature\\"..M.sound.."") (Line 1200)
New Code: ?
  Reply With Quote