Problem with double variables in my skript

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

JuanDouCore_

New Member
May 20, 2017
7
0
0
23
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?
 
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?
It may not be the case, but try parsing your variable as an integer. numbers in skript include decimals while integers do not.
 
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).
 
Status
Not open for further replies.