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.

Problem with double variables in my skript

Discussion in 'Skript' started by JuanDouCore_, Aug 11, 2017.

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

    JuanDouCore_ New Member

    Joined:
    May 20, 2017
    Messages:
    7
    Likes Received:
    0
    My problem is that I am placing a variable of a skript mio in the scoreboard of featherboard, but in the scoreboard the variable appears as a double decimal number, and I want it to be an integer, so that instead of appearing 1.0 it appears Only 1, some way to fix this?
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    in skript is the variable 1.0? if not then this sounds like a featherboard problem not a skript problem.
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    It may not be the case, but try parsing your variable as an integer. numbers in skript include decimals while integers do not.
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    as Wynnevir said, parsing it as an integer should fix that. Now, why parsing it as an integer fixes the issue? Well, it's because numbers in Skript are threated as doubles (basically, a number with decimal points) and integers as longs (it's basically an int but with major capacity).
     
Thread Status:
Not open for further replies.

Share This Page

Loading...