giving player more than 1 item with a command

  • 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 community!

    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!

Aug 18, 2023
18
1
3
so i'm still trying to make a strength smp plugin but i'm up to the withdraw command. I want to add an integer to make you able to withdraw more than 1 at a time so it's easier.
Heres My Code:

command /withdrawstrength <integer>:
trigger:
if {strength::%player's uuid%} is set:
subtract arg-1 from {strength::%player's uuid%}
give player knowledge book named "&4&lStrength Book" with amount arg-1

there is proper spacing btw thats not the error ik it doesnt show but i use tabs

Edit: its the with amount arg-1 thats the problem but without it it only gives one and it doesnt work with it
 
Last edited:
so i'm still trying to make a strength smp plugin but i'm up to the withdraw command. I want to add an integer to make you able to withdraw more than 1 at a time so it's easier.
Heres My Code:

command /withdrawstrength <integer>:
trigger:
if {strength::%player's uuid%} is set:
subtract arg-1 from {strength::%player's uuid%}
give player knowledge book named "&4&lStrength Book" with amount arg-1

there is proper spacing btw thats not the error ik it doesnt show but i use tabs

Edit: its the with amount arg-1 thats the problem but without it it only gives one and it doesnt work with it
Your issue is that the syntax your using is a bit backwards; when giving a player an item; you put the # of item first like so (And also replace "with" with "of"):
Code:
give player (number here) of (item type here) #Any custom NBT data after that