Zulfen / ZulfBungee

A Skript addon which adds proxy integration.
Apache License 2.0
11 stars 2 forks source link

player's current server expression #34

Open trushniuser opened 1 year ago

trushniuser commented 1 year ago

Describe the bug Can't get the expression "%player's current server%" etc

To reproduce command /giveserver: trigger: send "%player's current server%"

Expected behavior To get player's current server. Because I'm doing /find script and I need to check if proxy player not in the limbo server to show him offline instead.

Screenshots https://imgur.com/a/ggjWRA3

Spigot server information (in this order)

Proxy information (in this order)

trushniuser commented 1 year ago

check "if player is online" is also doesn't work UPD: The problem also appears on the latest version of skript 2.7.0-beta3 UPD2: Network variables are also broken. I made a skript: command /test: trigger: set network variable {a} to "1" send "%network variable {a}%" to player delete network variable {a} An internal error occures after executing this command. image

Zulfen commented 1 year ago

Can you show me the full errors after running those commands?

trushniuser commented 1 year ago

This shows (https://pastebin.com/WxzGBpgM) when I want to get server's name:

command /giveserver:
    trigger:
        send "%player's current server%"

This shows when I check if the player is online (https://pastebin.com/Ey4TMALH)

command /find <text>:
    trigger:
        if proxy player arg is online:
            send "1"

As I can see if I'm the only player on the server there is no problem to get my current server (not other player), to check if I'm online (not other) and global variables work better (as for me they work faster). After another player joins the server scripts don't work even if I want to get my current server or check if I'm online. I hope that I can help you with this full errors pastes.

Zulfen commented 1 year ago

Do you have any other scripts running? I can't seem to recreate the issue with the setup I have. (i.e. with just one player) What it seems like to me is some other script or code requesting stuff...

Zulfen commented 1 year ago

Update: I have been able to replicate this! Gonna try working on a fix now.

Zulfen commented 1 year ago

Should be fixed in the latest pre-release.

trushniuser commented 1 year ago

Still errors while using this script:

on join:
    set network variable {name::%player%} to placeholder "unity_chatname" from player

on proxy player disconnect:
    set network variable {find::%player%} to now formatted as "dd.MM.yyyy HH:mm:ss"

command /find <text>:
    usage: &7Использование: /find [Игрок]
    trigger:
        if proxy player arg is online:
            if "%arg's current server%" isn't "limbo":
                if network variable {vanish::*} doesn't contain arg:
                    send message formatted "&fИгрок %network variable {name::%arg%}% &fнаходится на сервере <##7FFF00>%arg's current server%" to sender
                else:
                    send message formatted "&fИгрок %network variable {name::%arg%}% &fпоследний раз был в сети &a%network variable {find::%arg%}%"
            else:
                send message formatted "&cИгрок %arg% не найден." to sender 
        else if network variable {name::%arg%} is set: 
            send message formatted "&fИгрок %network variable {name::%arg%}% &fпоследний раз был в сети &a%network variable {find::%arg%}%" to sender
        else:
            send message formatted "&cИгрок %arg% не найден." to sender

Getting this error: https://pastebin.com/r3GTTrCt