I’m currently using this function:
function abbreviateNumber (n)
local s = tostring(math.floor(n))
return string.sub(s, 1, ((#s - 1) % 3) + 1) .. ({"", "K", "M", "B", "T", "QA", "QI", "SX", "SP", "OC", "NO", "DC", "UD", "DD", "TD", "QAD", "QID", "SXD", "SPD", "OCD", "NOD", "VG", "UVG"})[math.floor((#s - 1) / 3) + 1]
end
and i want to figure out i could get the result of the function, i’ve searched everywhere and couldn’t find any source that i could find useful.
you should probably look into what return does, not sure what you searched but one search for me gave me a lot
local abbreviatedNumber = abbreviateNumber(--number)
print(abbreviatedNumber)
for simple things like this its probably easier if you just put it in the script instead of using a function
1 Like
Thank you, this will be very useful in the future!
1 Like
system
(system)
Closed
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.