Solved split Numbers

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

pascal25565

Member
Jan 26, 2017
4
0
0
23
Hello SkUnity members,

I have a question.

How can i split a number in Skript?

For example: set {_amount} to 100000
send "%{_amount}%"
Now it is "100000" and i want to display it "100.000"

How?

Best regards
pascal25565
 
I think you can do this using subtext, for example:
code_language.skript:
set {_amount} to 100000
if {_amount} > 99999:
    set {_a1} to the first 3 characters of {_amount}
    set {_a2} to the last 3 characters of {_amount}
    broadcast "%{_a1}%.%_a2%"
:emoji_stuck_out_tongue:
 
Status
Not open for further replies.