dividing a number argument by 10, subtracts the answer from the result.
lostsucks opened this issue ยท 2 comments
Skript/Server Version
[04:20:39 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[04:20:39 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[04:20:39 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[04:20:39 INFO]: [Skript] Server Version: 1.20.6-131-ac64751 (MC: 1.20.6)
[04:20:39 INFO]: [Skript] Skript Version: 2.8.6 (skriptlang-github)
[04:20:39 INFO]: [Skript] Installed Skript Addons:
[04:20:39 INFO]: [Skript] - DiSky v4.17.2
[04:20:39 INFO]: [Skript] - skript-particle v1.3.1 (https://github.com/sovdeeth/skript-particle)
[04:20:39 INFO]: [Skript] - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[04:20:39 INFO]: [Skript] - SkBee v3.5.2 (https://github.com/ShaneBeee/SkBee)
[04:20:39 INFO]: [Skript] Installed dependencies: None
Bug Description
When trying to set the users fly speed to arg-1 / 10
, it returns the argument subtracted by the answer
Ex: /speed 1 = 1 - (1 / 10) = 0.9
Expected Behavior
The output was supposed to be '0.1', but instead returned '0.9', which is the argument minus the answer.
Steps to Reproduce
command speed <number>:
permission: fragment.speed
usage: &7Usage: &f/speed <speed>
trigger:
if player is flying:
set player's fly speed to (arg-1) / 10
send "&fYou have set your fly speed to %arg-1 / 10%!"
/speed 1
- Note:
(arg-1) / 9.9999
, works. Along with(number-arg) / 10
Errors or Screenshots
Other
No response
Agreement
- I have read the guidelines above and affirm I am following them with this report.
This isnt an issue. arg-1
can be a bit unintuitive coz the parser thinks ur trying to do arg minus 1
, which is why the brackets around it fix it. And obviously you're getting 2 different values. You're setting it to (arg-1) / 10
(which works) but then sending yourself arg-1 / 10
(which doesnt, coz Skript is interpreting the arg-1
as arg minus 1
).