[SOLVED] Converting big numbers to prefixes


#1

For example:

Gold: 1000
I would want to convert that to
Gold: 1K

Continuing on…
Gold: 1.2K
Gold: 3K
Gold: 3M (Million)
Gold: 3B (Billion)
Etc…

How do I do this? /Thanks!:blush:


#2

Let’s take a variable with a value of 1234.
Use a condition to check if the variable >999.
And use actions to:

  • divide by a hundred and round: 12
  • divide by ten: 1.2
  • add K: 1.2K

Use the same logic for M, B and such.
But be careful, you will have to turn your variables to string variables (because letters are text).