Hi,
I get an error that seems to only spawn when I'm forced off my mount in the argent tournament area. Error is:
Code:
layout.lua:192: bad argument #1 to 'lower' (string expected, got nil)
layout.lua:192: in function `UNIT_NAME_UPDATE'
layout.lua:276: in function <oUF_Lyn\layout.lua:214>
Code involved in the "name update" area is:
Code:
local updateName = function(self, event, unit)
if(self.unit ~= unit) then return end
local name = UnitName(unit)
self.Name:SetText(string.lower(name))
if unit=="targettarget" then
local totName = UnitName(unit)
local pName = UnitName("player")
if totName==pName then
self.Name:SetTextColor(0.9, 0.5, 0.2)
else
self.Name:SetTextColor(1,1,1)
end
else
self.Name:SetTextColor(1,1,1)
end
if unit=="target" then -- Show level value on targets only
updateLevel(self, unit, name)
end
end
I boldfaced the part in the code that the error seems to align with. Anyone have an idea what is causing it and how to fix? Thank you!