I'm trying to get friendly player count to show for a couple different spells and the code doesn't seem to be working at all. I'm not sure what I'm doing wrong and when I look at other code for similar things it seems to use an aura but I never can find where to edit it.
function()
local numInRange = 0
for i = 1, GetNumGroupMembers() do
local unit = (IsInRaid() and "raid" or "party")..i
if UnitExists(unit) and not UnitIsDeadOrGhost(unit) and UnitInRange(unit, "Emerald Blossom") then
numInRange = numInRange + 1
end
end
return numInRange
end