1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Formatting numbers

Discussion in 'Skript' started by oHeckGage, Jun 2, 2021.

Thread Status:
Not open for further replies.
  1. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    105
    Likes Received:
    4
    I need to make my numbers (Ex: 100,000) to be shortened to 100K for example for my leaderboard. I've looked all over but the only thing I can find is where you add a comma every 3 numbers. Any help?
     
  2. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    597
    Likes Received:
    37
    maybe use a placeholder from papi for that
     
  3. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    105
    Likes Received:
    4
    I don't know how to do that, so no, sorry
     
  4. wCrazy_

    wCrazy_ Member

    Joined:
    Jan 7, 2021
    Messages:
    15
    Likes Received:
    0
    You can try this:
    Code (Text):
    1. if {ex} is "100000":
    2.      set {ex.format} to "100K"
     
    #4 wCrazy_, Jun 3, 2021
    Last edited: Jun 4, 2021
  5. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    105
    Likes Received:
    4
    No you can't cause if it was something like 101000, you'd be formatting it to 100k, not 101k, and I don't want to type out every thousand up to the trillions lmfao
     
Thread Status:
Not open for further replies.

Share This Page

Loading...