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 link with another command

Discussion in 'Skript' started by SuperEpps22556, Oct 7, 2017.

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

    Joined:
    Oct 3, 2017
    Messages:
    15
    Likes Received:
    2
    Skript Version: Latest
    Minecraft Version: 1.8.x

    I'm using the litebans plugin and trying to figure out a way I can link /warn to automatically do /kick with the same messages. I haven't really done anything with arguments so I'm not really sure how this would work. I had something like this but it does not do the second command.

    1. on command "/warn <text> <text>":
    2. if player has permission "litebans.warn":
    3. execute console command "/kick arg-0 arg-1"
    4. else:
    5. message "&cYou cannot execute that command."
     
  2. White

    White Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    445
    Likes Received:
    25
    When arguments are in text, you need to put % % around them. Example is %arg-1%.
     
  3. SuperEpps22556

    Joined:
    Oct 3, 2017
    Messages:
    15
    Likes Received:
    2
    on command "/warn <text> <text>":
    if player has permission "litebans.warn":
    execute console command "/kick %arg-0% %arg-1%"
    else:
    message "&cYou cannot execute that command"

    Error:
    This command doesn't have any arguments (warnkick.sk, line 3: execute console command "/kick %arg-0% %arg-1%"')
     
  4. White

    White Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    445
    Likes Received:
    25
    Remove the quotes on the first line. And when you start arguments, it starts by 1, not 0.
     
  5. Pikachu

    Moderator Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    871
    Likes Received:
    139
    Medals:
    The string in the event is just for the main command (warn), nothing else
     
Thread Status:
Not open for further replies.

Share This Page

Loading...