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 Simple Skript error?

Discussion in 'Skript' started by Noahrobs, Aug 7, 2017.

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

    Noahrobs Member

    Joined:
    Jul 13, 2017
    Messages:
    12
    Likes Received:
    0
    command /wands <text> Wand1 <player>:
    usage: /wands help
    trigger:
    if arg 1 is "get":
    message "Enjoy your new wand!"
    give a stick named "<gold>Wand" to the player
    if arg 1 is not set:
    message "&6&lWands &8// &7Correct usage is /wands help"
    if arg 1 is "help":
    message "&6&lWands &8// &7Use /wands get Wand1"
    message "&6&lWands &8// &7Use /wands give Player Wand1"
    if arg 1 is "give"
    give a stick named "<gold>Wand" to arg 2

    Why doesnt this work?

    I'd like for it to work as it looks..

    https://pastebin.com/QR4bhqeg
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Try putting your <text> things in [] [<text>]
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Do you receive an error message? Because an error in your coding and an error in Skript are super different, and no one can help you if we don't know exactly what you're asking for. (Btw I'm not being mean XD I do this all the time and people come and tell me to do this)
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Here, I fixed your code, hope it helps:

    Code (Skript):
    1. command /wands [<text>] [<text>] [<player>]:
    2.     usage: /wands help
    3.     trigger:
    4.         if arg 1 is not set:
    5.             send "&6&lWands &8// &7Correct usage is /wands help"
    6.         else:
    7.             if arg 2 is not set:
    8.                 send "&6&lWands &8// &7You must specify a wand"
    9.                 send "&6&lTypes: &fWand1"
    10.             else:
    11.                 if arg 3 is not set:
    12.                     send "&6&lWands &8// &7You must specify a player"
    13.                 else:
    14.                     if arg-2 is "Wand1":
    15.                         if arg 1 is "get":
    16.                             send "Enjoy your new wand!"
    17.                             give arg-3 1 stick named "&6Wand"
    18.                         if arg 1 is "help":
    19.                             send "&6&lWands &8// &7Use /wands (Give/Get) (Type) (User)"
    20.                         if arg 1 is "give":
    21.                             give arg-3 1 stick named "&6Wand"
    --- Double Post Merged, Aug 7, 2017, Original Post Date: Aug 7, 2017 ---
    Note, I have not tested it, but with my example, you should be able to figure out how to properly fix your issues and errors.
     
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    [​IMG]
    replace all " "(4 space) to tab( ) from your script.
     
  6. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    I re-did it like this:

    command /wands [<text>] [<text>] [<player>]:
    usage: /wands help
    trigger:
    if arg 1 is not set:
    message "test"
    else:
    if arg 3 is not set:
    if arg 1 is "get":
    message "Enjoy your new wand!"
    give a stick named "<gold>Wand" to the player
    if arg 1 is not set:
    message "&6&lWands &8// &7Correct usage is /wands help"
    if arg 1 is "help":
    message "&6&lWands &8// &7Use /wands get Wand1"
    message "&6&lWands &8// &7Use /wands give Player Wand1"
    else:
    if arg 1 is "give":
    give a stick named "<gold>Wand" to arg-3
     
Thread Status:
Not open for further replies.

Share This Page

Loading...