View Single Post
01-09-13, 10:07 PM   #7
MiRai
A Warpwood Thunder Caller
Join Date: Jul 2011
Posts: 96
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:
  1. local arrow = {[[Interface\Addons\oUF_Fail\media\textureArrow]]}
  2. local arrowDefaultColor = {.3,.45,.65}
  3.  
  4. lib.setPowerArrowColor = function(self)
  5.     local _, powerType = UnitPowerType(self.__owner.unit)
  6.     self.Power.arrow:SetVertexColor(unpack(oUF.colors.power[powerType] or arrowDefaultColor))
  7. end
  8.  
  9. lib.setClassArrowColor = function(self)
  10.     local _, class = UnitClass(self.__owner.unit)
  11.     self.Power.arrow:SetVertexColor(unpack(oUF.colors.class[class] or arrowDefaultColor))
  12. end

If you need more from that, please let me know.
  Reply With Quote