Solved Possible name conflict of variables.

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

AlexMan_

Member
May 3, 2019
3
0
1
Code:
on death of a player:
    attacker is a player
    add 1 to {kills.%attacker%}

command /kills [<offline player>]:
    trigger:
        if arg 1 is set:
            send "&3[Kingdoms&bPVP&3]&b %arg 1% har &3%{kills.arg 1}% &bkills!"
        else:
            send "&3[Kingdoms&bPVP&3]&b Du har &3%{kills.player}% &bkills!"

Every 5 seconds:
      loop all players:
            set score "&7%{kills.%loop-player%}%&f" in sidebar of loop-player to 9

How do i fix this?
I want it to display the same number but in the command it displays "<None>"
 
When directing variables to a player, you need to use the % expression on each side of the target. By that, you need to change:

Code:
{kills.player}

to

Code:
{kills.%player%}

The same goes when using arguments.
 
When directing variables to a player, you need to use the % expression on each side of the target. By that, you need to change:

Code:
{kills.player}

to

Code:
{kills.%player%}

The same goes when using arguments.

Thanks! I didn't know that :emoji_slight_smile:
 
Status
Not open for further replies.