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.

Give item to player

Discussion in 'Skript' started by Endissitin, Jul 29, 2019.

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

    Endissitin New Member

    Joined:
    Jul 23, 2019
    Messages:
    5
    Likes Received:
    0
    Code (Text):
    1. command /ssg [<item>] [<text>] [<player>]:
    2.     executable by: console
    3.     trigger:
    4.         set {signshop::item::%arg-1%::amount} to {_amount}
    5.         give {_amount} of %arg-1% named "%arg-2%" to player-arg
    I needed to get he player to give the item arg-1 and the amount by _{amount}, but this error is given:

    Error: There's no types.bot in a command event

    I don't know what to do, if anyone knows how to solve thank you very much ;-;
    I don't speak English, sorry for misspellings
     
  2. Azternaut

    Azternaut Member

    Joined:
    Feb 3, 2017
    Messages:
    15
    Likes Received:
    2
    Try this:

    Code (Text):
    1. command /ssg [<item>] [<text>] [<player>]:
    2.     trigger:
    3.         set {_amount} to {signshop::item::%arg-1%::amount}
    4.         set {_item} to "%{_amount}% %arg-1%" parsed as item
    5.         give {_item} named text-arg to player-arg
     
  3. XanderWander

    XanderWander Member

    Joined:
    Jan 27, 2017
    Messages:
    71
    Likes Received:
    5
    Code (Text):
    1. command /ssg [<item>] [<text>] [<player>]:
    2.     executable by: console
    3.     trigger:
    4.         set {signshop::item::%arg-1%::amount} to {_amount}
    5.         give arg-3 {_amount} of arg-1 named arg-2
     
    #3 XanderWander, Jul 29, 2019
    Last edited: Jul 29, 2019
Thread Status:
Not open for further replies.

Share This Page

Loading...