How to check items in player inventory? Please 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.

BrownMee

Active Member
Apr 16, 2018
126
6
18
23
Code:
if name of clicked item is "&cAky's Book":
        cancel event
        loop all items in player's inventory:
            if name of loop-item-1 is "&a☘ &eLullaby Box":
                loop all items in player's inventory:
                    if name of loop-item-2 is "&a☘ &eSoul Flame":
                        loop all items in player's inventory:
                            if name of loop-item-3 is "&a☘ &eWeave":
                                if amount of loop-item-3 is more than 63:
                                    loop all items in player's inventory:
                                        if name of loop-item-4 is "&a☘ &eFerry Dust":
                                            if amount of loop-item-4 is more than 63:
                                                remove 1 of loop-item-1 from player
                                                remove 1 of loop-item-2 from player
                                                remove 64 of loop-item-3 from player
                                                remove 64 of loop-item-4 from player

I want to check if player have these items and remove it.

This is the error
'loop-item-3' can only ever have one value at most,
[doublepost=1620445775,1620403464][/doublepost]bump
 
Status
Not open for further replies.