the 1st argument is not a text

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

ezmann!44

Member
Jul 2, 2017
35
1
0
26
code_language.skript:
command /punish [<offline player>] [<text>]:
    trigger:
        if arg-2 is not set:
            send "Try again!"
        if arg-2 is set:
            if length of argument 1 <= 16:
                send "it works!"
            else:
                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:(
 
Try this perhaps:
code_language.skript:
        if arg-2 is set:
            set {_length} to length of the string argument
            if {_length} <= 16:
                send "it works!"
 
thank you !!
[doublepost=1500329972,1499794838][/doublepost]
Try this perhaps:
code_language.skript:
        if arg-2 is set:
            set {_length} to length of the string argument
            if {_length} <= 16:
                send "it works!"
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
Reactions: Wynnevir
thank you !!
[doublepost=1500329972,1499794838][/doublepost]
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
Because that's what he gave you. Make arg-1 a text and parse it or put it in a text
 
Status
Not open for further replies.