Thread Tools Display Modes
Prev Previous Post   Next Post Next
06-09-11, 01:10 PM   #1
Sauerkraut
A Wyrmkin Dreamwalker
 
Sauerkraut's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 52
Help with non working unit check

I don't really know how to explain this, but I am trying to fix an addon that allows either all units or a specified list of units. The all units part is working fine however when specific units are selected nothing is output to the game. There is no error it just does nothing.

From the addon

Code:
local function UnitisAllowed(unit)
	for key, val in pairs(addon.CONFIG.units) do
		if UnitIsUnit(unit, val) then return true end
	end
	return false
end
Code:
if eventType == "SPELL_AURA_APPLIED" and addon.BUFF_SPELLS[spellname] and isEnemy(destFlags) and (addon.CONFIG.allunits or UnitisAllowed(destName)) then
from the config

Code:
addon.CONFIG = {
	allunits = false, 
	units = {
		"target",
		"focus",
	},
}
Am I using the correct syntax for the check? I'm just not sure why it is failing.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Help with non working unit check


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off