Originally Posted by ObbleYeah
Thanks. Both versions give off the same error.
Code:
castbar.lua:48: Usage: UnitIsUnit("unit", "otherUnit")
which seems to only happen upon logging in/reloading the ui.
seems to have fixed the other issue though!
|
I'm guessing it's
unit that's throwing
nil, we're already checking
self.unit. Try either one of these depending on which you were using.
Code:
if not unit or not UnitIsUnit(self.unit,"player") or not UnitIsUnit(unit,"player") then return; end
Code:
if not unit or self.unit~="player" or not UnitIsUnit(self.unit,unit) then return; end
Originally Posted by jeruku
What about checking to see if the casting unit is the castbars unit?
Lua Code:
if (unit ~= self.unit) then return end
|
I try to include target if you happen to be targeting yourself. Same with including focus if you have focus on yourself.
With varying extents, this is what
UnitIsUnit() is checking for.