From what you posted, it looks like you used single-quotes (') where it expected double-quotes (").
The format string is supposed to be in double-quotation marks, from my understanding of Lua.
Code:
local function truncate(value)
if value >= 1e6 then
return format("%.1fm", value / 1e6)
elseif value >= 1e4 then
return format("%.1fk", value / 1e3)
else
return value
end
end
I remembered the ifnot bit from my own interface testing, where I had [solid_ifnot_mp99:maxmp][solid_if_mp99
ercmp][solid_if_mp99:%][solid_if_mp99: - ][solid_if_mp99:curmp] for my mana string (and a couple of instances where I had health percentage replacing the name in ToT/Foc/ToF/Pet frames).