Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How would I make numeral prefixes work in game?

Asked by 5 years ago

In some games, you can see it says "100M" and not "100000000"

Not asking for a script, but I am asking for which string/function I would use to make this work.

1 answer

Log in to vote
0
Answered by
farizarps 132
5 years ago

There is no built in function so you would have to make your own.

You can use the # to get the length of the number as a string and have a table of prefix thresholds (7=M,10=B etc) and compare the string length to a value in the table and use that to format it.

(i have working code ill post when i can)

Ad

Answer this question