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.

Solved How to remove decimal remainder from a number

Discussion in 'Skript' started by EdgyBoi, Jan 10, 2022.

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

    EdgyBoi Member

    Joined:
    Mar 5, 2021
    Messages:
    1
    Likes Received:
    0
    I am creating a skript that divides a number by 3.
    in some cases, the number is not an integer.
    ex: 3333.33
    How can I remove the .33?

    current code line:
    set {reb} to ({reb}/3)
     
  2. BaeFell

    BaeFell I'm Poppy
    Admin MVP

    Joined:
    Nov 27, 2016
    Messages:
    887
    Likes Received:
    227
    You could try:
    Code (Skript):
    1.  
    2. set {reb} to ({reb}/3) parsed as integer
    3.  
    Which might drop the decimals or fail miserably.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...