Definitely appreciate the help, Phanx. Using
self.__owner.unit throws this now immediately upon logging in:
Code:
Message: Interface\AddOns\oUF_Fail\lib.lua:121: attempt to index field 'Power' (a nil value)
Time: 01/09/13 21:58:16
Count: 1
Stack: Interface\AddOns\oUF_Fail\lib.lua:121: in function <Interface\AddOns\oUF_Fail\lib.lua:119>
(tail call): ?
(tail call): ?
Interface\AddOns\oUF\ouf.lua:158: in function `func'
Interface\AddOns\oUF\events.lua:113: in function `?'
Interface\AddOns\oUF\events.lua:76: in function <Interface\AddOns\oUF\events.lua:62>
Locals: self = <unnamed> {
__owner = oUF_failPlayer {
}
frequentUpdates = true
PostUpdate = <function> defined @Interface\AddOns\oUF_Fail\lib.lua:119
colorPower = true
disconnected = false
SetValue = <function> defined @Interface\AddOns\oUF_Fail\Elements\smooth.lua:7
ForceUpdate = <function> defined @Interface\AddOns\oUF\elements\power.lua:193
SetValue_ = <function> defined =[C]:-1
0 = <userdata>
arrow = <unnamed> {
}
bg = <unnamed> {
}
Smooth = true
}
_ = 1
powerType = "RAGE"
(*temporary) = nil
(*temporary) = "RAGE"
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field 'Power' (a nil value)"
arrowDefaultColor = <table> {
1 = 0.3
2 = 0.45
3 = 0.65
}
Just to be sure, here's that chunk of code (line 6 below is line 121 in the error):
Lua Code:
local arrow = {[[Interface\Addons\oUF_Fail\media\textureArrow]]}
local arrowDefaultColor = {.3,.45,.65}
lib.setPowerArrowColor = function(self)
local _, powerType = UnitPowerType(self.__owner.unit)
self.Power.arrow:SetVertexColor(unpack(oUF.colors.power[powerType] or arrowDefaultColor))
end
lib.setClassArrowColor = function(self)
local _, class = UnitClass(self.__owner.unit)
self.Power.arrow:SetVertexColor(unpack(oUF.colors.class[class] or arrowDefaultColor))
end
If you need more from that, please let me know.