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.

"on command" won't recognize command with multiple arguments

Discussion in 'Skript' started by Des, Mar 2, 2021.

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

    Des Member

    Joined:
    Aug 11, 2020
    Messages:
    2
    Likes Received:
    0
    I'm trying to set the variable "teleported" to true whenever the player uses their /home [home name] but Skript only recognizes when the player runs /home by itself. Is there anyway to check the arguments? The /home command is using the one provided by Essentials. This is my first thread, I hope I've provided enough details.

    Code (Text):
    1. on command "/home":
    2.   set {_list::*} to arguments
    3.   if {_list::*} contains {_list::1}:
    4.     set {teleported::%player%} to true
    **Note: I've also tried:
    Code (Text):
    1.  
    2. on command "/home":
    3.   set {teleported:%player%} to true
    4.  
     
  2. Xgod2205

    Xgod2205 Member

    Joined:
    Feb 25, 2021
    Messages:
    17
    Likes Received:
    0
    No i do not know anyway to check for arguments maybe do

    on command "/home <text>"

    because then you can also check if its just /home and say make sure you define the home you want to teleport to
     
  3. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    I would recommend using this:
    Code (Skript):
    1. command /home [<string>]:
    2.     trigger:
    3.         arg 1 is "1":
    4.             set {teleported::%player%} to true
    Instead of "on Command" to this case.
     
  4. Des

    Des Member

    Joined:
    Aug 11, 2020
    Messages:
    2
    Likes Received:
    0
    Hey, thank you both for the responses. I changed the variable from teleported to home and it started working. There may have been another conflict since that variable is used multiple times. Anyways thank you both for taking time to reply!

    Also how do I close the thread since the problem was resolved?
     
Thread Status:
Not open for further replies.

Share This Page

Loading...