Description
I'm fairly new to skript, and I've created a command that tells the player how much more of an item they need out of 64
Steps to Reproduce
Once the command is run, it'll say "An internal error occurred while attempting to perform this command." to my player, here's the code:
options:
amount: 64
command /antimatter:
trigger:
set {_am} to amount of sweet berries named " &4&ki &cAnti-matter berries &4&ki" with lore "&3Trade for anti-matter gens" and " &9&l&kii &6/antimatter &9&l&kii" in player's inventory
if player has 64 sweet berries named " &4&ki &cAnti-matter berries &4&ki" with lore "&3Trade for anti-matter gens" and " &9&l&kii &6/antimatter &9&l&kii":
remove 64 of sweet berries named " &4&ki &cAnti-matter berries &4&ki" with lore "&3Trade for anti-matter gens" and " &9&l&kii &6/antimatter &9&l&kii" from player
give player 1 light gray glazed terracotta named "&b&ki &f&lAnti-Matter Generator &b&ki" with lore "&4Resets every 10 seconds!"
send "&b&lOculis &8&l» &f&lAnti-Matter &3generator received!"
else:
set {_needed} to {@amount} - {_am}
send "&b&lOculis &8&l» &3You need %{_needed}% more"
Expected Behavior
It should send a message to the player that reads "&b&lOculis &8&l» &3You need (64 - however many more you need) more" but, as stated before it says An internal error occurred while attempting to perform this command." instead.
Errors / Screenshots
Here's the gist link to the error: https://gist.github.com/SmellyEggplant/e4382b0a8b3894f3c3138dbc7713570c
Server Information
Server version/platform: Minehut
Skript version: 2.4-beta5-MH (custom version)
Thanks in advance!