Return a percentage sign in Lua string.format
snippet in lua

Return a percentage sign in Lua string.format

user3443

function()
  local z = math.max(0, UnitPower("player")) / math.max(1, UnitPowerMax("player")) * 100;
  return string.format("%.f %%", z);
end