It is necessary that a certain currency is debited from PlayerCoin when buying. But it gives an error
code:
errors:
code:
Code:
command /shop:
Trigger:
Set {_Inventory} to chest with 5 rows named "SHOP"
Set slot 1 of {_Inventory} to diamond sword named "§a§lDIAMOND SWORD"
Open {_Inventory} to executor
on inventory click:
If name of event-inventory is "SHOP":
cancel the event
If clicked slot is 1:
If PlayerCoin(executor) >= 19:
Remove 19 from PlayerCoin(executor)
Give player diamond sword named "DIAMOND SWORD"
errors:
Code:
PlayerCoin(the command sender) can't have anything removed from it (NeoMine\Main\Commands\GriefShop.sk, line 13: Remove 19 from PlayerCoin(executor)')