Variables in scoreboard not working

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

BuqTheBuq

New Member
Apr 23, 2020
7
0
1
Hello, take a look on my skript

command /o0oscoreboardo0o123:
permission: scoreboardffa.skript
trigger:
set name of sidebar of player to "&6FFA Scoreboard"
set score "Kills: {kills.%player%}" in sidebar of player to 4
set score "Deaths: {deaths.%player%}" in sidebar of player to 3
set score "Streak: {streak.%player%}" in sidebar of player to 2
set score "Top Streak: {topstreak.%player%}" in sidebar of player to 1

on death:
player is in "FFA1"
victim is a player
attacker is a player
add 1 to {kills.%attacker%}
add 1 to {deaths.%victim%}
add 1 to {streak.%attacker%}
set {streak.%victim%} to 0
if {streak.%attacker%} is greater than {topstreak.%attacker%}:
set {topstreak.%attacker%} to {streak.%attacker%}
on first join:
set {kills.%player%} to 0
set {deaths.%player%} to 0
set {streak.%player%} to 0
set {topstreak.%player%} to 0

The problem is that the variables aren't working. It shows "Kills: {kills.NoMoreEscape} instead of showing the actual kills; which should be "Kills: (number of kills)" the same goes with the deaths and the streak and the top streak. here is a capture of it:
 

Attachments

  • Capture4.PNG
    Capture4.PNG
    41.1 KB · Views: 259
Hello, take a look on my skript

command /o0oscoreboardo0o123:
permission: scoreboardffa.skript
trigger:
set name of sidebar of player to "&6FFA Scoreboard"
set score "Kills: {kills.%player%}" in sidebar of player to 4
set score "Deaths: {deaths.%player%}" in sidebar of player to 3
set score "Streak: {streak.%player%}" in sidebar of player to 2
set score "Top Streak: {topstreak.%player%}" in sidebar of player to 1

on death:
player is in "FFA1"
victim is a player
attacker is a player
add 1 to {kills.%attacker%}
add 1 to {deaths.%victim%}
add 1 to {streak.%attacker%}
set {streak.%victim%} to 0
if {streak.%attacker%} is greater than {topstreak.%attacker%}:
set {topstreak.%attacker%} to {streak.%attacker%}
on first join:
set {kills.%player%} to 0
set {deaths.%player%} to 0
set {streak.%player%} to 0
set {topstreak.%player%} to 0

The problem is that the variables aren't working. It shows "Kills: {kills.NoMoreEscape} instead of showing the actual kills; which should be "Kills: (number of kills)" the same goes with the deaths and the streak and the top streak. here is a capture of it:

if you want to use variables or expressions inside a text you will have to put it between double percent sign:
example:
Code:
set score "Kills: %{kills.%player%}%" in sidebar of player to 4
 
thanks man. do you know how to disable the scoreboard on a specific command? for example: o
on command "/disable":

what is the effect to remove a scoreboard
 
thanks man. do you know how to disable the scoreboard on a specific command? for example: o
on command "/disable":

what is the effect to remove a scoreboard

Code:
delete score "score name" in sidebar of player
before asking in the forum it's highly recommanded to search in the documentation.
 
Status
Not open for further replies.