Solved Give player an item in a certain slot

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

FireRoz

Active Member
May 28, 2020
133
6
18
Hi,
I am having this issue where whenever I execute this piece of code:
Code:
command /test:
  permission: test
  trigger:
    set slot 0 of player to compass named "&cTest"

It will showup this error:
https://imgur.com/a/9ZmYKOP
 
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"
 
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"
Same error.
Also, I don't want player's current hotbar slot, I want a specific one.
[doublepost=1606141701,1606129599][/doublepost]
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"
ok, what does "'player' is not an item stack" mean???
 
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
[doublepost=1606486614,1606485530][/doublepost]
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

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:)
 
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
[doublepost=1606486614,1606485530][/doublepost]

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:)
player is not an item stack.
im using 1.8 for the record hehe
 
did you put in brackets like I did?
I dont see any brackets other than in the
Code:
command /test [] []
which to my knowledge, dont matter. Also, Yes i did include the brackets.
[doublepost=1606577680,1606576643][/doublepost]
did you put in brackets like I did?
also, all of these addons but tuske work.
so idk
[doublepost=1606583350][/doublepost]
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"
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?
[doublepost=1606583632][/doublepost]SOLVED -
Code:
set slot 0 of player's inventory to compass named "&ctest"
hehehe goodluck every1
 
Status
Not open for further replies.