Jump to content

Skript If argument


Hotampa
 Share

Recommended Posts

So I making a sumo minigame and its almost done but the main command cant work because the arguments are not working.

This is one part of the skript.


command /sumo [<string>] [<string>] [<string>]:
    executable by: players
    usage: /sumo [<string>] [<string>] [<string>]
    trigger:
        if arg-1 is not "help" or "admin" or "stats" or "join" or "leave":
            make player execute "/sumo help"
        if arg-1 is "admin":
            if arg-2 is “create”:
                if player has permission “sumo.admin”:
                    if arg-3 is not set:
                        send “&3Usage&f: /sumo admin create <ArenaName>” to player
                    else:
                        set {Sumo.Arena::%arg-3%} to arg-3
                        send “&fArena &3%arg-3% has been created” to player
                    else:
                        send “&3You do not have permission” to player


This is the error I get.


Can't compare a text with "create" (Sumo.sk line 8: if arg-2 is "create":')

 


Can anybody help me fix this issue because I really just cant seem to fix it.
Edited by Hotampa
Link to comment
Share on other sites

Try changing the arguments from string to text. Not sure if thats the issue tho.

Edited by _Tarna_

Discord - Tarna256#8675

In-game name - _Tarna_

Follow @Tarna_256 on Twitter

---------------------------------------------------------

[VIP] - 7/27/2020

Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share



×
×
  • Create New...