Jump to content

Errors with arguments


Madlirex

Recommended Posts

Hello Madlirex, If your using <argument> it wont really work, try something more specific such as <player> or <text> so that skript can read it, Arguments/arg is the 2nd or 3rd ect... command line command /test <player> in this case player would be arg-1, for a better example if i did

command /whisper <player> <text>:
    trigger:
        if arg-1 is set:
            send "&7%player% Whipsers To You: %arg-2%" to arg-1
            send "&7You Have Whispered To %arg-1%"

it reads <player> as player and <text> as my message and uses them to send to the player i selected in arg-1

Hope this helps!

 

Just a skripter who likes to have fun

I also think I'm pretty good at it

PS my discord is Enchanted#3933 incase idk anything?

Link to comment
Share on other sites

1 hour ago, Skymner said:

Hello Madlirex, If your using <argument> it wont really work, try something more specific such as <player> or <text> so that skript can read it, Arguments/arg is the 2nd or 3rd ect... command line command /test <player> in this case player would be arg-1, for a better example if i did

command /whisper <player> <text>:
    trigger:
        if arg-1 is set:
            send "&7%player% Whipsers To You: %arg-2%" to arg-1
            send "&7You Have Whispered To %arg-1%"

it reads <player> as player and <text> as my message and uses them to send to the player i selected in arg-1

Hope this helps!

 

Hi Skymner, 

I want to make something like

command /playergroups <argument> [<argument>]:

  trigger:

    if arg-1 is list:

      if arg-2 is not set:

        “code”

    if arg-1 is admins:

      if arg-2 is add:

        “code”

so do you think I can just replace argument with text or is there some other type of argument for that?

Link to comment
Share on other sites

3 minutes ago, Madlirex said:

Hi Skymner, 

I want to make something like

command /playergroups <argument> [<argument>]:

  trigger:

    if arg-1 is list:

      if arg-2 is not set:

        “code”

    if arg-1 is admins:

      if arg-2 is add:

        “code”

so do you think I can just replace argument with text or is there some other type of argument for that?

oh and it doesn’t helped

Link to comment
Share on other sites

Madlirex, Im not sure i understand <argument> [<argument>] but i assume arg-1 is player because of <> instead of [<>] and [<>] is text or another player arg, but if you want a player group as a skript, thats alot of coding, i would suggest lp,vault,essintals ,essintals chat, install those and lookup videos on how to use them better, that will add player groups,

if arg-1 is admins:

admins is not defined so you could use options and set it to a player with a certain thing attached to them such as

command /admin <player>:
    trigger:
        set {admin::%arg-1%} to 1
        execute console command "op arg-1"
        
command /playergroups <player>:
    trigger:
        if {admin::%arg-1%} = 1:
            send "&cThis User Is An Admin"
        else:
            send "&7&lThis User Has No Rank"

Once again, Hope this helps

 

Just a skripter who likes to have fun

I also think I'm pretty good at it

PS my discord is Enchanted#3933 incase idk anything?

Link to comment
Share on other sites

A more advanced version of the skript above me would be something like...

command /Admin <player>:
    permission: playergroups
    trigger:
        set {admin::%arg-1%} to 1
        execute console command "op %arg-1%"
        send "&cYou Are Now An Admin!" to arg-1
        send "&cYou Made %arg-1% An Admin!" to player
        
command /playergroups <player>:
    permission: playergroupsView
    trigger:
        if {admin::%arg-1%} = 1:
            send "&cThis User Is An Admin"
        else:
            if {mod::%arg-1%} = 1:
                send "&5This User Is A Mod"
            else:
                send "&7&lThis User Has No Rank"
            
            
command /DeAdmin <player>:
    permission: playergroups
    trigger:
        set {admin::%arg-1%} to 0
        set {mod::%arg-1%} to 1
        execute console command "deop %arg-1%"
        send "&c%player% Has Just Demoted You From Admin!" to arg-1
        send "&cYou Just Demoted %arg-1%" to player

command /DeRank <player>:
    permission: playergroups
    trigger:
        set {mod::%arg-1%} to 0
        set {admin::%arg-1%} to 0
        send "&c%player% Has Just Removed Your Rank" to arg-1
        send "&cYou Have Just Removed %arg-1%'s Rank"

Just a skripter who likes to have fun

I also think I'm pretty good at it

PS my discord is Enchanted#3933 incase idk anything?

Link to comment
Share on other sites

7 hours ago, Skymner said:

A more advanced version of the skript above me would be something like...

command /Admin <player>:
    permission: playergroups
    trigger:
        set {admin::%arg-1%} to 1
        execute console command "op %arg-1%"
        send "&cYou Are Now An Admin!" to arg-1
        send "&cYou Made %arg-1% An Admin!" to player
        
command /playergroups <player>:
    permission: playergroupsView
    trigger:
        if {admin::%arg-1%} = 1:
            send "&cThis User Is An Admin"
        else:
            if {mod::%arg-1%} = 1:
                send "&5This User Is A Mod"
            else:
                send "&7&lThis User Has No Rank"
            
            
command /DeAdmin <player>:
    permission: playergroups
    trigger:
        set {admin::%arg-1%} to 0
        set {mod::%arg-1%} to 1
        execute console command "deop %arg-1%"
        send "&c%player% Has Just Demoted You From Admin!" to arg-1
        send "&cYou Just Demoted %arg-1%" to player

command /DeRank <player>:
    permission: playergroups
    trigger:
        set {mod::%arg-1%} to 0
        set {admin::%arg-1%} to 0
        send "&c%player% Has Just Removed Your Rank" to arg-1
        send "&cYou Have Just Removed %arg-1%'s Rank"

Ok but what to do if I want  something like that:

/playergroups add

/playergroups remove

?

Link to comment
Share on other sites

21 hours ago, Madlirex said:

Ok but what to do if I want  something like that:

/playergroups add

/playergroups remove

?

hey.

Use this tutorial on SkriptHub, guaranteed to help you with your command problems

Custom Commands - Skript Hub

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Owner of Lifestealed, Labs, Encore, UNOfficially and Observed
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - 5/8/2024

[MOD] 5/8/2024 - Present

 

Link to comment
Share on other sites

16 hours ago, Madlirex said:

Sorry but, still not helpful!

...

 

W h a t   I s   T h e   I s s u e

Edited by AgentGamerPro

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Owner of Lifestealed, Labs, Encore, UNOfficially and Observed
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - 5/8/2024

[MOD] 5/8/2024 - Present

 

Link to comment
Share on other sites

2 hours ago, _Mr_Puppy_ said:

why yall making this so complex... 

just do this:

command /playergroups [<text>]:

using argument is not valid. Use text instead.

this has been elaborated, they dont get it

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Owner of Lifestealed, Labs, Encore, UNOfficially and Observed
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - 5/8/2024

[MOD] 5/8/2024 - Present

 

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
×
×
  • Create New...