Solved How do I make a currency debiting?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

TheDikey

New Member
Aug 6, 2021
9
0
1
17
It is necessary that a certain currency is debited from PlayerCoin when buying. But it gives an error
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)')
 
Status
Not open for further replies.