Hello, I’m currently having issues with giving large numbers commas. I use this function for it:
return function(number)
local i, j, minus, int, fraction = tostring(number):find('([-]?)(%d+)([.]?%d*)')
int = int:reverse():gsub("(%d%d%d)", "%1,")
return minus .. int:reverse():gsub("^,", "") .. fraction
end
(This is a module script btw)
It works perfectly fine, however, once I reach this specific number: 1,000,000,000,000,000,000,000 (1se) it just breaks and returns this odd decimal number (Btw the decimal matches the whole number, but for some reason there is a decimal after the first 2)
Any help would be appreciated, thanks!