if arg 2 is a number doesnt work.

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

DieserTicket

New Member
Feb 11, 2019
9
0
0
23
Hey, i wanna edit the message that i get if my arg 2 is not a number.
The default message of skript is like this:
'test' is not a number
Correct usage: /command [<offline player>] [<number>]
i wanna change this message with "if arg 2 is not a number" but it doesnt work.

heres my skript
Code:
command /setgeld [<offline player>] [<number>]:
    trigger:
        if arg 1 is set:
            if arg 2 is set:
                if arg 2 is number:
                    if arg 1 is player:
                        message "&cDu darfst deinen eigenen Kontostand nicht setzen"
                    else:
                        if player has permission "setgeld":
                            set {geld.%arg 1%} to arg 2
                            message "&aKonstostand von &e%arg 1% &awurde auf &e%arg 2% &agesetzt."
                else:
                    message "&a/setgeld arg1 &carg2 &f[Arg2 muss eine Nummer sein!]"
            else:
                message "&a/setgeld arg1 &carg2 &f[Du hast arg 2 nicht gesetzt!]"
        else:
            message "&a/setgeld &carg1 arg2 &f[Du hast arg1 und arg2 nicht gesetzt!]"
 
Argument 2 will always be a number if you define it that way (or it will be none)
 
Status
Not open for further replies.