Solved Optional Arguments

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

CormanYT

Active Member
Jan 6, 2018
122
5
18
THIS THREAD IS SOLVED! DO NOT MAKE NEW REPLIES!

How do I make a default value for an optional argument? This is my current code:

code_language.skript:
command /home [<home="home">]:
 
Last edited:
Sorry, I messed up the explanation. I'll edit the post. What I ment is this:

How do I set a default value for an optional argument, when it is not set?
 
You would need to make an options section, if I understand you properly.
code_language.skript:
options:

    home: home

command /home [<{@home}>]:
 
Oh, I'll just use a variable then.
[doublepost=1516919643,1516919391][/doublepost]Never mind it was this: command /home [<home="home">]:

It should have been this: command /home [<text="home">]:

Thanks for your advice though, it would've worked too.
 
  • Like
Reactions: Wynnevir
Status
Not open for further replies.