Solved Giving player an item set as a variable

  • 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.
Hey there! Again cx
Figured I'd make a new post about this rather than attaching it to the one I made recently
since it's a completely different issue.
Having trouble figuring out how to give a player an item set as a variable.

{defaulthelm}, etc. is set to and item already, it just needs to be given.
But it doesn't recognize {defaulthelm} (etc..) as an item. I tried looking up solutions to this
and couldn't find anything, so if anyone could help with this that would be much appreciated ^^

code_language.skript:
command kit [<text>]:
    trigger:
        if arg-1 is not set:
            make player execute command "/kits"
        if arg-1 is not "default":
            make player execute command "/kits"
        if arg-1 is "default":
            if player can hold 448 command block:
                give 1 stone pickaxe of efficiency 3 named "&3Starter Pick" to player
                give 1 stone axe of efficiency 3 named "&3Starter Axe" to player
                give 5 bread to player
                give 1 {defaulthelm} to player
                give 1 {defaultchest} to player
                give 1 {defaultlegs} to player
                give 1 {defaultboots} to player

Error:
'1 {defaulthelm}' can not be added to the player because the former is neither an item type, an inventory nor an experience point
 
Hey there! Again cx
Figured I'd make a new post about this rather than attaching it to the one I made recently
since it's a completely different issue.
Having trouble figuring out how to give a player an item set as a variable.

{defaulthelm}, etc. is set to and item already, it just needs to be given.
But it doesn't recognize {defaulthelm} (etc..) as an item. I tried looking up solutions to this
and couldn't find anything, so if anyone could help with this that would be much appreciated ^^

code_language.skript:
command kit [<text>]:
    trigger:
        if arg-1 is not set:
            make player execute command "/kits"
        if arg-1 is not "default":
            make player execute command "/kits"
        if arg-1 is "default":
            if player can hold 448 command block:
                give 1 stone pickaxe of efficiency 3 named "&3Starter Pick" to player
                give 1 stone axe of efficiency 3 named "&3Starter Axe" to player
                give 5 bread to player
                give 1 {defaulthelm} to player
                give 1 {defaultchest} to player
                give 1 {defaultlegs} to player
                give 1 {defaultboots} to player

Error:
'1 {defaulthelm}' can not be added to the player because the former is neither an item type, an inventory nor an experience point
If the item amount of the variable is already 1, you don't have to include the 1 in the effect. If the item amount might not be 1, you can use the expression %number% of %item% to give 1 of that item to a player
 
Status
Not open for further replies.