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.

Command Arg

Discussion in 'Skript' started by Digszin, Jul 23, 2018.

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

    Digszin Member

    Joined:
    Jan 26, 2017
    Messages:
    28
    Likes Received:
    0
    How i can check the command argument, like?
    Code (Skript):
    1. on command "/g [<text>]":
    2.     if text contains "blabla":
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    if arg-1 contains "balbla"
     
  3. Digszin

    Digszin Member

    Joined:
    Jan 26, 2017
    Messages:
    28
    Likes Received:
    0
    The expression 'argument' can only be used within a command (test.sk, line 2: if arg-1 contains "balbla":')
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    oh crap i misread it.... ok its done a different way,,, let me see if i can remember.
    Code (Skript):
    1. on command "/g [<text>]":
    2.     if arguments contains "blabla":
    i just ran this in console, no errors
     
  5. Digszin

    Digszin Member

    Joined:
    Jan 26, 2017
    Messages:
    28
    Likes Received:
    0
    We use argument without s, arguments works
     
  6. mathhulk

    mathhulk Member

    Joined:
    Jan 29, 2017
    Messages:
    55
    Likes Received:
    15
    I'm not sure if you are listening for a command that has already been registered by another script or plugin. However, if you are creating commands yourself, you should be registering commands using the correct syntax. I would not suggest listening for custom commands using the on command event and instead would suggest looking into https://forums.skunity.com/wiki/commands/.
     
    • Agree Agree x 2
  7. Digszin

    Digszin Member

    Joined:
    Jan 26, 2017
    Messages:
    28
    Likes Received:
    0
    I'm trying to listen
     
Thread Status:
Not open for further replies.

Share This Page

Loading...