How to set to text and player?

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

Williambriggs

Member
Jan 13, 2019
10
0
0
code_language.skript:
command /gang [<text>] [<type>]:
    trigger:
        if arg-1 is not set:
        #Help Section#
            send "/gang new : &7Creates a gang"
            send "/gang invite : &7Invites player's to gang"
            send "/gang accept : &7Accepts gang invite"
            send "/gang deny : &7Denies gang invite"
            send "/gang leave : &7Leaves current gang"
            send "/gang info : &7Sends info on gang"
            send "/gang desc : &7Sets a description of the gang"
            
            #Create new Gang#
        else if arg-1 is "new":
            if arg-2 is set:
                set {gang.%player's uuid%} to arg-2
                set {gangprefix.%player's uuid%} to "<yellow>%{gang.%player's uuid%}%<reset> "
                send "&7[&eGangManager&7]&r You have created a gang named %arg-2%"
            else:
                send "&7[&eGangManager&7]&r Please set a name of the gang!"
                
            #Invite to Gang#   
        else if arg-1 is "invite":
            if arg-2 is a player:
                set {gangi.%arg-2%} to "Invited"
                set {gangg.%arg-2%} to "%{gangprefix.%command sender's uuid%}%"
                send "&7[&eGangManager&7]&r You have been invited to %{gangprefix.%command sender's uuid%}%by %command sender%" to arg-2
                send "&7[&eGangManager&7]&r Successfully invited %arg-2% to %{gangprefix.%command sender's uuid%}%"
            else:
                send "&7[&eGangManager&7]&r Please set the player you want to invite!"
                
             #Accept invite#   
        else if arg-1 is "accept":
            if {gangi.%player%} is "Invited":
                set {gangi.%player%} to 0
                set {gangprefix.%player's uuid%} to  "%{gangg.%arg-2%}%"
I get an error saying that the
Code:
send "&7[&eGangManager&7]&r You have been invited to %{gangprefix.%command sender's uuid%}%by %command sender%" to arg-2
part isn't a player the arg-2 how do i make it so it can view it as a player and as a text? because i need arg-2 for both player and text.
 
You arg-2 parsed as a player in the subcommands where you need it as a player
 
Status
Not open for further replies.