View Single Post
05-25-10, 05:39 AM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,961
spellid doesn't contain a value for that function.

In another function it is stored in a temporary variable of spellID but then that information is lost when you leave the function it is in unless you pass it to another function to work with which you aren't.

Look at the highlighted code and change appropriately and it should work.

Code:
function NuttyWarAnnounce:COMBAT_LOG_EVENT_UNFILTERED(event, timestamp, subevent, srcGUID, srcName, srcflags, dstGUID, dstname, dstflags, spellID)
	if UnitGUID("player") == srcGUID then
		if subevent == "SPELL_AURA_APPLIED" then
			if NuttyWarAnnounce.spellids.shouts[spellID] then			
				NuttyWarAnnounce:sendmessage()
				else if NuttyWarAnnounce.spellids.alerts[spellID] then
				NuttyWarAnnounce:spellcastcheck(spellID)
				end
			end
		end
		
		if subevent == "SPELL_AURA_REMOVED" then
			if NuttyWarAnnounce.spellids.shouts[spellID] then
				NuttyWarAnnounce:sendmessage()
			end 
		end
	end
end

	function NuttyWarAnnounce:spellcastcheck(spellid)
	print(spellid) --not working
	end
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote