-
What do you want to achieve? Keep it simple and clear!
Topic says all about what i need -
What is the issue? Include screenshots / videos if possible!
I have no idea about it -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I looked few topics, though nothing helps
Function:
local function Suffix(Number, Precision)
local Suffixes = {
"", " K"," M", " B", " T",
" Qd", " Qn", " Sx", " Sp",
" Oc", " No", " De", " Un",
" Tr", " Qud", " Qun", " Sxd",
" Spd", " Ocd", " Nod", " Vg",
" UVg"," DVg"," TVg"," QdVg",
" QnVg"," SxVg"," SpVg"," OcVg",
" NoVg"," Tg"," UTg"," DTg"," TTg",
" QdTg"," QnTg"," SxTg"," SpTg"," OcTg",
" NoTg"," qg"," Uqg"," Dqg"," Tqg"," Qdqg",
" Qnqg"," Sxqg"," Spqg"," Ocqg"," Noqg",
" Qg"," UQg"," DQg"," TQg"," QdQg"," QnQg",
" SxQg"," SpQg"," OcQg"," NoQg"," sg"," Usg",
" Dsg"," Tsg"," Qdsg"," Qnsg"," Sxsg"," Spsg",
" Ocsg","Nosg"," Sg"," USg"," DSg"," TSg",
" QdSg"," QnSg"," SxSg"," SpSg"," OcSg"," NoSg",
" Og"," UOg"," DOg"," TOg"," QdOg"," QnOg"," SxOg",
" SpOg"," OcOg"," NoOg"," Ng"," UNg"," DNg"," TNg",
" QdNg"," QnNg"," SxNg"," SpNg"," OcNg"," NoNg"
}
local Index = math.floor(math.log10(Number) / 3)
if Index < 0 then
Index = 0
end
local Suffix = Suffixes[Index + 1]
Number = Number / (10 ^ (3 * Index))
Number = tostring(math.floor(Number * 10 ^ Precision) / 10 ^ Precision)
return Number .. Suffix
end
It currently gives an error while working with negative numbers one