LunaUnitFrames

LunaUnitFrames

268k Downloads

[abbrev:name] tag does not work.

dennyh opened this issue ยท 2 comments

commented

When [abbrev:name] tag is used the addon generates a large number of errors and only updates when the unit has a one word name.

Error:
Message: Interface\AddOns\LunaUnitFrames\modules\tags.lua:20: bad argument #3 to 'gsub' (string/function/table expected)
Time: Fri Nov 15 17:22:01 2019
Count: 1257
Stack: Interface\AddOns\LunaUnitFrames\modules\tags.lua:20: bad argument #3 to 'gsub' (string/function/table expected)
[C]: in function gsub' Interface\AddOns\LunaUnitFrames\modules\tags.lua:20: in function <Interface\AddOns\LunaUnitFrames\modules\tags.lua:19> Interface\AddOns\LunaUnitFrames\modules\tags.lua:472: in function ?'
Interface\AddOns\LunaUnitFrames\modules\tags.lua:810: in function <Interface\AddOns\LunaUnitFrames\modules\tags.lua:800>

Locals: (*temporary) = "Jorn Skyseer"
(*temporary) = "([^%s]+) "
(*temporary) = nil

commented

Turns out the function abbreviateName is not defined.
local function abbreviateName(text) return string.sub(text, 1, 1) .. "." end

commented

fixed in latest version