I have trouble in my first expirience of creating my first addon for myself.. Im new in Lua coding too.
So here are my code:
Code:
EventFrame:RegisterEvent("UNIT_AURA")
EventFrame:SetScript('OnEvent', function(self, event, unit, ...)
if(unit == "player") then
if(UnitAura(unit, "Arcane charge", nil)) then
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitAura("player", "Arcane charge", nil)
abStacks = tonumber(count)
ChatFrame1:AddMessage("Testing AB:" .. tostring(abStacks) .. ", MS:" .. tostring(msStacks) .. ", CC:" .. tostring(ccStacks), 1.0, 0.0, 0.0, 53, 5)
end end
end)
The problems is UnitAura("player", "Arcane charge") always returning nil.. I know what im doing it wrong but I cant understand what exactly Im doing wrong. Thx.