I have a function that returns the number in the thousands, eg:
function getMilharNumber(n) -- critico
return tostring(math.floor(n)):reverse():gsub("(%d%d%d)","%1,"):gsub(",(%-?)$","%1"):reverse()
end
print(getMilharNumber(1000000)) -- retorna 1,000,000
But it returns 1,000,000 with commas, I want to know how to return with points like this: 1,000,000 .
Thank you.