Solved Simple Skript error?

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

Noahrobs

Member
Jul 13, 2017
12
0
0
24
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
 
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
Try putting your <text> things in [] [<text>]
 
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)
 
Here, I fixed your code, hope it helps:

code_language.skript:
command /wands [<text>] [<text>] [<player>]:
    usage: /wands help
    trigger:
        if arg 1 is not set:
            send "&6&lWands &8// &7Correct usage is /wands help"
        else:
            if arg 2 is not set:
                send "&6&lWands &8// &7You must specify a wand"
                send "&6&lTypes: &fWand1"
            else:
                if arg 3 is not set:
                    send "&6&lWands &8// &7You must specify a player"
                else:
                    if arg-2 is "Wand1":
                        if arg 1 is "get":
                            send "Enjoy your new wand!"
                            give arg-3 1 stick named "&6Wand"
                        if arg 1 is "help":
                            send "&6&lWands &8// &7Use /wands (Give/Get) (Type) (User)"
                        if arg 1 is "give":
                            give arg-3 1 stick named "&6Wand"
[doublepost=1502112941,1502112667][/doublepost]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.
 
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
k5wiEjC2QlU.jpg
replace all " "(4 space) to tab( ) from your script.
 
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
 
Status
Not open for further replies.