Can use var for give in event on inventory click
Barlaf opened this issue ยท 2 comments
Skript/Server Version
[22:52:42 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[22:52:42 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[22:52:42 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[22:52:42 INFO]: [Skript] Server Version: 1.21.1-57-b483da4 (MC: 1.21.1)
[22:52:42 INFO]: [Skript] Skript Version: 2.9.2 (skriptlang-github)
[22:52:42 INFO]: [Skript] Installed Skript Addons:
[22:52:42 INFO]: [Skript] - SkCord v2.2-RELEASE
[22:52:42 INFO]: [Skript] - skript-placeholders v1.6.0 (https://github.com/APickledWalrus/skript-placeholders)
[22:52:42 INFO]: [Skript] - Skungee v2.0.0-BETA-5
[22:52:42 INFO]: [Skript] - skRayFall v1.9.28 (https://sk.rayfall.net/)
[22:52:42 INFO]: [Skript] - SkBee v3.6.1 (https://github.com/ShaneBeee/SkBee)
[22:52:42 INFO]: [Skript] Installed dependencies:
[22:52:42 INFO]: [Skript] - SQLibrary v7.1
[22:52:42 INFO]: [Skript] - Vault v1.7.3-b131
[22:52:42 INFO]: [Skript] - WorldGuard v7.0.11-beta1+a801a9d
Bug Description
In event "On inventory click", When i want to use give command, i can't use var for set quantity or item to give.
Expected Behavior
I want to use var for give method in event "on inventory click"
Steps to Reproduce
Just use this code:
on inventory click:
give 1 diamond to event-player
# Work
on inventory click:
set {_nb} to 2
give {_nb} diamond to event-player
# Line 3: (test.sk)
# '{_nb} diamond' can't be added to a player because the former is neither an item type, an inventory nor an experience point
# Line: give {_nb} diamond to event-player
on inventory click:
set {_nb} to 2
give "%{_nb}% diamond" to event-player
# Compile but do nothing
Errors or Screenshots
[23:07:29 INFO]: [Skript] Reloading test.sk...
[23:07:29 INFO]: Line 3: (test.sk)
[23:07:29 INFO]: '{_nb} diamond' can't be added to a player because the former is neither an item type, an inventory nor an experience point
[23:07:29 INFO]: Line: give {_nb} diamond to event-player
[23:07:29 INFO]:
[23:07:29 INFO]: [Skript] Encountered 1 error while reloading test.sk! (14ms)
Other
No response
Agreement
- I have read the guidelines above and affirm I am following them with this report.