Originally Posted by Wimpface
So here I am, writing yet another oUF layout based on p3lim's great work. And also, here I am, finding yet another problem writing tags for myself to use.
I'm trying to get my power text for players/pets powertype-colored and shortened to "11.2k" for example. But this just won't work the way I want it to.
|
Code:
oUF.Tags['[ppower]'] = function(unit)
local _, str = UnitPowerType(unit)
local mini = UnitPower(unit)
return ('%s%s|r'):format(hex(colors.power[str] or {1, 1, 1}), shortVal(mini))
end
%d needs a digit, while 'k' is a letter, you would need %s so it accept strings.