1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Loop inventory and remove items

Discussion in 'Skript' started by Qifi, Feb 5, 2017.

Thread Status:
Not open for further replies.
  1. Qifi

    Qifi Member

    Joined:
    Feb 5, 2017
    Messages:
    3
    Likes Received:
    0
    This has worked on the previous versions of the skript:
    Code (Skript):
    1. loop all items in the player's inventory:
    2.     remove loop-item from the player
    but now it says

    Code (Skript):
    1. loop-item can't be removed from a player because the former is neither a potion, an item type nor an inventory (test.sk, line 38: remove loop-item from the player')
    So how do I remove loop-item now?
     
    #1 Qifi, Feb 5, 2017
    Last edited: Feb 5, 2017
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Why you loop all items in player's inventory ? Im using clear player's inventory
     
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    I dont want to clear player's inventory, i am seraching for an item and then removing that item. The fact is that this exact expression does not work even tho it has worked before.
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Try
    loop all items in the inventory of player:
     
    • Funny Funny x 1
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Yep, thats working, thanks @Grin
     
Thread Status:
Not open for further replies.
Loading...