View Single Post
07-11-10, 11:20 AM   #4
Taryble
A Molten Giant
 
Taryble's Avatar
Join Date: Jan 2009
Posts: 811
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_mp99ercmp][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).
__________________
-- Taryble

Last edited by Taryble : 07-11-10 at 11:24 AM. Reason: spelling and ifnot info
  Reply With Quote