I need help making a list var output differently

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

Fuenzy

Member
Nov 28, 2020
4
0
1
What I mean is, I want a list var to send like this
Code:
"1, 2, 3"
Instead of
Code:
"1, 2, and 3"


My code kinda bad but here it is:

Code:
options:
    useperm: "plugins.see"
    
    
command /plugins [<text>] [<text>]:
    trigger:
        player does not have permission "@useperm":
            send "Plugins (1): &a37"
        arg-1 is not set:
            player has permission "@useperm":
                {plugins::*} is set:
                    send "Plugins (%{count}%): &a%{plugins::*}%"
                else:
                    send "Plugins (0):"
        else if arg-1 is set:
            player has permission "@useperm":
                arg-1 is "add":
                    arg-2 is set:
                        {plugins::*} does not contain arg-2:
                            add 1 to {count}
                            add arg-2 to {plugins::*}
                        else:
                            send "Plugins (): Hey, you already added this one buddy."
                    
                    else:
                        send "Plugins (): Hey, you forgot to add the name lol"
                else if arg-1 is "remove":
                    arg-2 is set:
                        {plugins::*} contains arg-2:
                            subtract 1 from {count}
                            remove arg-2 from {plugins::*}
                        else:
                            send "Plugins (): Hey, that does not exist stupid!"
                    else:
                        send "Plugins (): Hey, you forgot to add the name lol"
                            
                    

on tab complete of "/":
    clear tab completions
 
Not sure where in your code the problem is, but here is an example of how you can do that:
Change:
Code:
command /test:
  trigger:
    send "{var::*}"
to
Code:
command /test:
  trigger:
    set {_temp} to "%{var::*}%"
    replace all "and" with "," in {_temp}
    send "%{_temp}%"
 
Status
Not open for further replies.