Skript

Skript

743k Downloads

Arithmetic returning Object when multiple valid operations causing unexpected parsing

sovdeeth opened this issue ยท 0 comments

commented

Skript/Server Version

[12:52:55 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[12:52:55 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[12:52:55 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[12:52:55 INFO]: [Skript] Server Version: git-Paper-390 (MC: 1.20.4)
[12:52:55 INFO]: [Skript] Skript Version: 2.8.4-nightly-aa8af9c (skriptlang-nightly)
[12:52:55 INFO]: [Skript] Installed Skript Addons:
[12:52:55 INFO]: [Skript]  - SkBee v3.3.0 (https://github.com/ShaneBeee/SkBee)
[12:52:55 INFO]: [Skript] Installed dependencies:
[12:52:55 INFO]: [Skript]  - WorldGuard v7.0.9+5934e49

Bug Description

send health of {z} / max health of {z} parses as send health of ({z} / max health of {z}) since the latter's return type is Object, it is accepted by the livingentity input of health of.

Expected Behavior

Parse as send (health of {z}) / (max health of {z})

Steps to Reproduce

> !spawn pig at spawn of world "world"
[12:50:58 INFO]: executing 'spawn pig at spawn of world "world"'
> !set {z} to last spawned pig
[12:51:03 INFO]: executing 'set {z} to last spawned pig'
> !send health of {z}
[12:51:07 INFO]: executing 'send health of {z}'
[12:51:07 INFO]: 5
> !send max health of {z}
[12:51:10 INFO]: executing 'send max health of {z}'
[12:51:10 INFO]: 5
> !send health of {z} / max health of {z}
[12:51:19 INFO]: executing 'send health of {z} / max health of {z}'
> !send "%(health of {z}) / (max health of {z})%"
[12:51:49 INFO]: executing 'send "%(health of {z}) / (max health of {z})%"'
[12:51:49 INFO]: 1

Errors or Screenshots

No response

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.