So I thought I had already, and upon updating I realize why I thought I did and why I hadn't.
I did previously attempt to update the oUF version being used, but upon doing so I am hit with this error that pretty much completely breaks my entire oUF layout, and I could never figure out how to fix it;
Code:
Message: Interface\AddOns\Roth_UI\units\player.lua:305: attempt to compare number with nil
Time: 08/09/17 20:50:05
Count: 1
Stack: Interface\AddOns\Roth_UI\units\player.lua:305: attempt to compare number with nilInterface\SharedXML\SharedBasicControls.lua:204: in function <Interface\SharedXML\SharedBasicControls.lua:203>
[C]: ?
Interface\AddOns\Roth_UI\units\player.lua:305: in function <Interface\AddOns\Roth_UI\units\player.lua:303>
(tail call): ?
(tail call): ?
Interface\AddOns\Roth_UI\embeds\oUF\ouf.lua:198: in function <Interface\AddOns\Roth_UI\embeds\oUF\ouf.lua:187>
(tail call): ?
Locals: errorMessage = "Interface\AddOns\Roth_UI\units\player.lua:305: attempt to compare number with nil"
DisplayMessageInternal = <function> defined @Interface\SharedXML\SharedBasicControls.lua:187
MESSAGE_TYPE_ERROR = 0
The offending function (4th line down is the one that causes the error):
Lua Code:
--post update orb func (used to display lowHp on percentage)
local updateValue = function(bar, unit, cur, max)
local per = 0
if max > 0 then per = floor(cur/max*100) end
local orb = bar:GetParent()
local self = orb:GetParent()
--if orb.type == "HEALTH" and (per <= 25 and not UnitIsDeadOrGhost(unit)) then
if orb.type == "HEALTH" and (per <= 25 or UnitIsDeadOrGhost(unit)) then
orb.lowHP:Show()
elseif orb.type == "HEALTH" then
orb.lowHP:Hide()
end
if orb.type == "HEALTH" and UnitIsDeadOrGhost(unit) then
orb.skull:Show()
elseif orb.type == "HEALTH" then
orb.skull:Hide()
end
if db.char[orb.type].value.hideOnEmpty and (UnitIsDeadOrGhost(unit) or cur < 1) then
orb.values:Hide()
elseif db.char[orb.type].value.hideOnFull and (cur == max) then
orb.values:Hide()
elseif not orb.values:IsShown() then
orb.values:Show()
end
if orb.type == "HEALTH" then
orb.values.top:SetText(oUF.Tags.Methods["diablo:HealthOrbTop"](self.unit or "player"))
orb.values.bottom:SetText(oUF.Tags.Methods["diablo:HealthOrbBottom"](self.unit or "player"))
elseif orb.type == "POWER" then
orb.values.top:SetText(oUF.Tags.Methods["diablo:PowerOrbTop"](self.unit or "player"))
orb.values.bottom:SetText(oUF.Tags.Methods["diablo:PowerOrbBottom"](self.unit or "player"))
end
if UnitIsDeadOrGhost(unit) then
bar:SetValue(0)
end
if ns.panel:IsShown() then
ns.panel.eventHelper:SetOrbsToMax()
end
end --post update orb func (used to display lowHp on percentage)
local updateValue = function(bar, unit, cur, max)
local per = 0
if max > 0 then per = floor(cur/max*100) end
local orb = bar:GetParent()
local self = orb:GetParent()
--if orb.type == "HEALTH" and (per <= 25 and not UnitIsDeadOrGhost(unit)) then
if orb.type == "HEALTH" and (per <= 25 or UnitIsDeadOrGhost(unit)) then
orb.lowHP:Show()
elseif orb.type == "HEALTH" then
orb.lowHP:Hide()
end
if orb.type == "HEALTH" and UnitIsDeadOrGhost(unit) then
orb.skull:Show()
elseif orb.type == "HEALTH" then
orb.skull:Hide()
end
if db.char[orb.type].value.hideOnEmpty and (UnitIsDeadOrGhost(unit) or cur < 1) then
orb.values:Hide()
elseif db.char[orb.type].value.hideOnFull and (cur == max) then
orb.values:Hide()
elseif not orb.values:IsShown() then
orb.values:Show()
end
if orb.type == "HEALTH" then
orb.values.top:SetText(oUF.Tags.Methods["diablo:HealthOrbTop"](self.unit or "player"))
orb.values.bottom:SetText(oUF.Tags.Methods["diablo:HealthOrbBottom"](self.unit or "player"))
elseif orb.type == "POWER" then
orb.values.top:SetText(oUF.Tags.Methods["diablo:PowerOrbTop"](self.unit or "player"))
orb.values.bottom:SetText(oUF.Tags.Methods["diablo:PowerOrbBottom"](self.unit or "player"))
end
if UnitIsDeadOrGhost(unit) then
bar:SetValue(0)
end
if ns.panel:IsShown() then
ns.panel.eventHelper:SetOrbsToMax()
end
end