Originally Posted by Bruners
Code:
oUF.Tags["[shortname]"] = function(unit)
return string.sub(UnitName(unit), 0, 12) or ""
end
|
Originally Posted by haste
As of 1.3.2 tags should return nil (ie. nothing) when they fail. oUF uses this to determine if the tag should have a prefix/affix. It also adds the "" if not.
Another note is that string.sub is byte based, and not character. This has discussed numerous times before however.
|
So what you are saying is that it should be like this?
Code:
oUF.Tags["[shortname]"] = function(unit)
if(not unit) then return end
return string.sub(UnitName(unit), 0, 12)
end
or just return the output?