Skript

Skript

743k Downloads

Can't get player

ninjaguardian opened this issue ยท 2 comments

commented

Skript/Server Version

[20:23:44 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[20:23:44 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[20:23:44 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[20:23:44 INFO]: [Skript] Server Version: 1.21-124-df3b654 (MC: 1.21)
[20:23:44 INFO]: [Skript] Skript Version: 2.9.1 (skriptlang-github)
[20:23:44 INFO]: [Skript] Installed Skript Addons:
[20:23:44 INFO]: [Skript]  - SkBee v3.5.8 (https://github.com/ShaneBeee/SkBee)
[20:23:44 INFO]: [Skript] Installed dependencies: None

Bug Description

When trying to grab the player that ran the command, it is always

Expected Behavior

It should output the players name

Steps to Reproduce

command /skripttest:
  trigger:
        execute console command "execute as @a run say %{_p}%"
        execute console command "execute as @a run say %{player}%"
        execute console command "execute as @a run say %{name of player}%"
        execute console command "execute as @a run say %{name of _p}%"

I also tried

        if player is not set:
            send "testing..." to all players
            loop all players:
                if loop-player has scoreboard tag "skriptlaunch":
                    execute console command "execute as @a run say %{name of loop-player}%"

and it sent . It got the player, but can't access it?

Errors or Screenshots

No response

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
commented

you should do "%name of player%". what you're doing right now by using curly braces {} is accessing a variable literally called name of player.

commented

Efnilite is correct, user error.