Solved List variable to placeholder

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

melanzy

Member
Aug 4, 2021
11
0
1
23
Skript Version: 2.2-dev36
Minecraft Version: 1.8.9
Addons i have that could affect this: placeholder-skript, ersatz, skellet



Code:
on placeholderapi placeholder request for the prefix "alive":
  if the identifier is "player":
    loop all players:
      if player is in {teamcount::*}:
        add 1 to {_aliveplayers}
        set the result to "%{_aliveplayers}%"

That above is a code so it can show in how many players are in {teamcount::*}, so i can put it in tab as how many players are in the team
added this command so i can test it out, it just sends <none>
Code:
command /test [<offlineplayer>]:
  trigger:
    if arg-1 is set:
      add arg-1 to {teamcount::*}
      wait 1 second
      send "%{_aliveplayers}%"
[doublepost=1628939755,1628899128][/doublepost]boosting ;(
 
I think you should read the basic of variables again, and you shouldn't use two addons that do exactly the same(skript-placeholders and ersatz)

This is your solution
Code:
on placeholderapi placeholder request for the prefix "alive":
    if the identifier is "player":
        set the result to "%size of {teamcount::*}%"

Code:
command /test:
    trigger:
        send "%size of {teamcount::*}%"
 
Status
Not open for further replies.