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

Solved Give player an item in a certain slot

Discussion in 'Skript' started by FireRoz, Nov 23, 2020.

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

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    5
    Hi,
    I am having this issue where whenever I execute this piece of code:
    Code (Text):
    1. command /test:
    2.   permission: test
    3.   trigger:
    4.     set slot 0 of player to compass named "&cTest"
    It will showup this error:
    https://imgur.com/a/9ZmYKOP

     
  2. Best Answer:
    Post #7 by FireRoz, Nov 28, 2020
  3. DarkKingMW

    DarkKingMW New Member

    Joined:
    Jun 22, 2018
    Messages:
    8
    Likes Received:
    0
    Try this: set slot 0 of player's inventory to compass named "&ctest" or this set slot 0 of player's current inventory to compass named "&ctest"
     
  4. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    5
    Same error.
    Also, I don't want player's current hotbar slot, I want a specific one.
    --- Double Post Merged, Nov 23, 2020, Original Post Date: Nov 23, 2020 ---
    ok, what does "'player' is not an item stack" mean???
     
  5. Marc

    Marc Active Member

    Joined:
    Nov 27, 2020
    Messages:
    94
    Likes Received:
    0
    Not sure but maybe its because you dont have the correct addon?
    I tried this command and it worked for me
    My addons:
    Sk:Query
    Sk:Vault
    Sk:Tablishknu
    Sk:TuSKe
    --- Double Post Merged, Nov 27, 2020, Original Post Date: Nov 27, 2020 ---
    quick update I made your skript a bit better so know you can choose a specific player and slot with a custom arg not set message!
    command /test [<player>] [<integer>]:
    permission: test
    trigger:
    set slot arg-2 of player to compass named "&cTest"
    if arg-1 and arg-2 are not set:
    send message "&c&lUsage: /test <Player> <Slot Number>"

    Hope I helped :emoji_slight_smile:)
     
  6. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    5
    player is not an item stack.
    im using 1.8 for the record hehe
     
  7. Marc

    Marc Active Member

    Joined:
    Nov 27, 2020
    Messages:
    94
    Likes Received:
    0
    did you put in brackets like I did?
     
  8. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    5
    I dont see any brackets other than in the
    Code (Text):
    1. command /test [] []
    which to my knowledge, dont matter. Also, Yes i did include the brackets.
    --- Double Post Merged, Nov 28, 2020, Original Post Date: Nov 28, 2020 ---
    also, all of these addons but tuske work.
    so idk
    --- Double Post Merged, Nov 28, 2020 ---
    Alright, I tried building like something in my server when i realized- if i get something to my first slot, then close my inventory, a compass named "test" in red will drop. idk why it doesn't show up immediately, can you help?
    --- Double Post Merged, Nov 28, 2020 ---
    SOLVED -
    Code (Text):
    1. set slot 0 of player's inventory to compass named "&ctest"
    hehehe goodluck every1
     
Thread Status:
Not open for further replies.

Share This Page

Loading...