Clamp function always returns a list
Phill310 opened this issue ยท 1 comments
Skript/Server Version
[18:03:26 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[18:03:26 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[18:03:26 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[18:03:26 INFO]: [Skript] Server Version: git-Paper-422 (MC: 1.20.4)
[18:03:26 INFO]: [Skript] Skript Version: 2.8.2 (skriptlang-github)
[18:03:26 INFO]: [Skript] Installed Skript Addons:
[18:03:26 INFO]: [Skript] - skript-gui v1.3 (https://github.com/APickledWalrus/skript-gui)
[18:03:26 INFO]: [Skript] - SkBee v3.2.1 (https://github.com/ShaneBeee/SkBee)
[18:03:26 INFO]: [Skript] Installed dependencies:
[18:03:26 INFO]: [Skript] - Vault v1.7.3-b131
[18:03:26 INFO]: [Skript] - WorldGuard v7.0.9+5934e49
Bug Description
Clamp function returns a list no matter how many numbers are provided which gives an error when trying to set a variable to its output.
Expected Behavior
Clamp function returns a number when given 1 input
Steps to Reproduce
command /demo:
trigger:
set {_demo} to clamp(0,2,5)
Errors or Screenshots
Other
No response
Agreement
- I have read the guidelines above and affirm I am following them with this report.
This sadly isn't an issue and is just a lack of function functionality there's no real way to decide at parse time if a function is single or plural until it's used
Solution that has been proposed once in discord I believe was to make a clamp %numbers% between %number% and %number%
expression