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

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

Des

Member
Aug 11, 2020
2
0
1
23
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:
on command "/home":
  set {_list::*} to arguments
  if {_list::*} contains {_list::1}:
    set {teleported::%player%} to true

**Note: I've also tried:
Code:
on command "/home":
  set {teleported:%player%} to true
 
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
 
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:
on command "/home":
  set {_list::*} to arguments
  if {_list::*} contains {_list::1}:
    set {teleported::%player%} to true

**Note: I've also tried:
Code:
on command "/home":
  set {teleported:%player%} to true
I would recommend using this:
code_language.skript:
command /home [<string>]:
    trigger:
        arg 1 is "1":
            set {teleported::%player%} to true

Instead of "on Command" to this case.
 
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?
 
Status
Not open for further replies.