Solved Get the amount of clicked item

  • 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.

Dabriel

Member
Aug 13, 2018
45
5
0
27
code_language.skript:
on inventory click:
    if player's current inventory's name is "&a&nBanker":
        cancel event
        if clicked item is not air:
            if clicked item is emerald named "&aGem":
                set {_amount} to amount of clicked item
                remove {_amount} from player's inventory
                add {_amount} to {eco::balance::%uuid of player%}

So this is my current code.
For some reason, it's not getting the amount of clicked item.
It keeps on saying that the "amount of clicked item" can only ever have one value at most.. what am I doing wrong?
 
Use "item amount":
code_language.skript:
    Item Amount:
        ID: ExprItemAmount
        Description:
            The amount of an item stack.
        Examples:
            send "You have got %item amount of player's tool% %player's tool% in your hand !" to player
        Since:
            2.2-dev24
        Return type: Number
        Changers:
            add
            set
            remove
            delete
            reset
        Patterns:
            [the] item[[ ]stack] (amount|size|number) of %itemstacks%
            %itemstacks%'[s] item[[ ]stack] (amount|size|number)

Ex:
code_language.skript:
set {_amount} to item amount of clicked item
 
Status
Not open for further replies.