Money Int

Hello, I was wondering how to turn an int, Ex. 14123456 into money format (adding commas) Ex. 14,123,456 Thanks for any help!

[lua]function toMoney(m)
m = tostring(m)
for i = #m - 3, 1, -3 do
m = string.sub(m, 0, i) … “,” … string.sub(m, i + 1)
end
return m
end[/lua]

Quick and dirty.

Thank you, works like a charm :D!

sounds sexy

http://en.wikipedia.org/wiki/Quick-and-dirty

But yes it’s kind of sexy.