disky online command

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

aabss

Supporter
Apr 8, 2023
13
0
1
23
i need help with my online command,
Code:
discord command online:
    prefixes: .
    trigger:
        set {_s::*} to the string argument split at ","
        reply with "Online players: %join all players with "" | ""%"
it wont work

Errors:

fQQfQrL.png
 
Two little things:
1. Your "set {_s::*} to the string argument split at ","" is not needed as there are no arguments in your command.
2. I've done a bit of testing, and the "all players" statement doesn't appear to work in this context (please correct me if I'm wrong). I've also found that the doubled 'double quotes' are an error in skriphub's examples. A way to get this to work is by looping all players, adding their names to a variable (e.g. {_p::*}), then sending the joint message. Here's an example that'll help:
Code:
discord command online:
    prefixes: .
    trigger:
        loop all players:
            add loop-player's name to {_p::*}
        reply with "Online players: %join {_p::*} with " | "%"

I hope this helps, please reply or send me a message if you have any questions!
 
Status
Not open for further replies.