Message: Interface\AddOns\oUF\elements\power.lua:46: attempt to call method 'UNIT_MAXMANA' (a nil value)
Time: 11/19/09 11:07:01
Count: 1
Stack: [string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:18: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
[C]: in function `UNIT_MAXMANA'
Interface\AddOns\oUF\elements\power.lua:46: in function <Interface\AddOns\oUF\elements\power.lua:39>
Locals: self = <unnamed> {
min = 100
frequentUpdates = 1
0 = <userdata>
unit = "player"
bg = <unnamed> {
}
disconnected = false
}
power = 100
(*temporary) = nil
(*temporary) = <unnamed> {
0 = <userdata>
}
(*temporary) = "OnPowerUpdate"
(*temporary) = "player"
(*temporary) = "attempt to call method 'UNIT_MAXMANA' (a nil value)"
UnitMana = <function> defined =[C]:-1
|
My code. I might be out of it but my code seems pretty standard and I've never had this problem before.
lua Code:
if unit == 'player' then
-- an extraneous frame to avoid frame level / strata problems with our backdrop
self.PowerFrame = CreateFrame('Frame', nil, self)
self.PowerFrame:SetFrameLevel(4)
self.PowerFrame:SetBackdrop(backdrop)
self.PowerFrame:SetBackdropColor(0, 0, 0)
self.PowerFrame:SetPoint('BOTTOMLEFT', self.Health, 'BOTTOMLEFT', 2, 2)
self.PowerFrame:SetPoint('TOPRIGHT', self.Health, 'BOTTOMRIGHT', -3, 10)
self.Power = CreateFrame('StatusBar', nil, self.PowerFrame)
self.Power:SetStatusBarTexture(texture)
self.Power:SetAllPoints()
self.Power.colorPower = 1
self.Power.frequentUpdates = 1
self.Power.bg = self.Power:CreateTexture(nil, 'BACKGROUND')
self.Power.bg:SetTexture(texture)
self.Power.bg:SetAllPoints()
self.Power.bg.multiplier = .6
This problem persists from most recent wowi release all the way back to at least v1.3 core. I can't try anything more recent because github refuses to let me download files on two different browsers.
edit: I should clarify if it wasn't already. This error only happens when self.Power.frequentUpdates is non-nil.