Shop Skript Help

  • 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.
Hi, so I've coded a custom shop (which I'm not going to put the source code into public circulation), and I can't figure out how to subtract from a variable and give items.

Here's my code so far (without the shop).

code_language.skript:
command /shopbuy <text>:
    trigger:
        if arg-1 is "leatherhelmet":
            if {balance::%player%} <= 10:
                take 10 from {balance::%player%}

It has an error with the take 10 from balance bit, and I've tried changing take to subtact, it needs to take 10 from the balance variable and give the player a leather helmet.

Thanks,

- TheCringleYT
 
Status
Not open for further replies.