Solved Triple Argument Cmd Help

  • 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 community!

    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.

JustADev

Well-Known Member
Apr 8, 2017
379
9
18
I am not very good with these, I need help:

command /coins [<text>] [<integer>] [<player>]:
trigger:
if arg 1 is not set:
send "&8[&eCoins&8] &7You must specify the use: &e(Add|Remove|Set)"
if arg 2 is not set:
send "&8[&eCoins&8] &7You must specify an amount"
if arg 1 is set:
arg-1 is "add":

So the first argument can either be: (Add|Remove|Set)
The 2nd arg has to be a Number
The 3rd arg has to be a player

Idk how to make this work, it gets my head in a knot... to set each type of situation.
Can someone help me sort this out? Appreciate it
 
1. next time would be better, if you use the code tag. so can we read better.
2. Maybe, a "Else" its better... like this way:

code_language.skript:
command /coins [<text>] [<integer>] [<player>]:
 trigger:
  if arg-1 is not set:
   send "Add|Remove|Set"
  else if arg-1 is "add":
   if arg-2 is set:
    if arg-3 is set:
     add arg-2 to {Coins::%arg-3%}
     send "%arg-2% added to %arg-3% balance."
    else:
     add arg-2 to {Coins::%player%}
     send "%arg-2% added to your Balance."
   else:
    send "Please enter amount"
  else if arg-1 is "remove"
#....
 
Status
Not open for further replies.