View Single Post
08-10-14, 01:47 PM   #11
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,335
Originally Posted by ObbleYeah View Post
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 View Post
What about checking to see if the casting unit is the castbars unit?

Lua Code:
  1. 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.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 08-10-14 at 02:04 PM.
  Reply With Quote