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.

the 1st argument is not a text

Discussion in 'Skript' started by ezmann!44, Jul 11, 2017.

Thread Status:
Not open for further replies.
  1. ezmann!44

    ezmann!44 Member

    Joined:
    Jul 2, 2017
    Messages:
    35
    Likes Received:
    1
    Code (Skript):
    1. command /punish [<offline player>] [<text>]:
    2.     trigger:
    3.         if arg-2 is not set:
    4.             send "Try again!"
    5.         if arg-2 is set:
    6.             if length of argument 1 <= 16:
    7.                 send "it works!"
    8.             else:
    9.                 send "arg-1 needs to be max 15 characters"
    Help pls it says the 1st argument is not a text for me but i need arg-1 to be offline player

    how to fix? :emoji_frowning:(
     
  2. Best Answer:
    Post #2 by ShaneBee, Jul 11, 2017
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Try this perhaps:
    Code (Skript):
    1.         if arg-2 is set:
    2.             set {_length} to length of the string argument
    3.             if {_length} <= 16:
    4.                 send "it works!"
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    thank you !!
    --- Double Post Merged, Jul 17, 2017, Original Post Date: Jul 11, 2017 ---
    UPDATE

    i just realized, when I write something like

    /punish Name Hacking w/ speed and BHOP

    it will still say its long (because arg-2 is long)
    how can i make it so it only looks at arg-1 if its long xD
     
    • Like Like x 1
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Because that's what he gave you. Make arg-1 a text and parse it or put it in a text
     
Thread Status:
Not open for further replies.

Share This Page

Loading...