Skungee Network Variables (Bungeecord)

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

Cold

Member
May 1, 2022
29
0
1
Hello!
Recently I started using Bungeecord and I choose to use Skungee, but then I wanted to make network variables, so I could have my playtime skript add seconds, minutes and hours to the player no matter which server they were in. But then something weird happend cause I did exactly how it said on Docs but when I tried to return the Network Variable it just said the variable were <none>? I have asked many why and searched on google but it didn't give me any valuable information, and thats how i'm here... So if any of you out there knows a solution I would be really grateful if you could share it!

Here's the skript and the error which were send in the console:
unknown.png

Code:
command /playtime [<offline player>]:
    trigger:
        if arg-1 isn't set:
            send "&aYou have played %network variable {seconds::%player's uuid%}% seconds, %network variable {minutes::%player's uuid%}% minutes and %network variable {hours::%player's uuid%}% hours!"
            stop
        if network variable {hasjoined.%arg-1's uuid%} is true:
            send "&a%arg-1% have played %network variable {seconds::%arg-1's uuid%}% seconds, %network variable {minutes::%arg-1's uuid%}% minutes and %network variable {hours::%arg-1's uuid%}% hours!"
            stop
        else:
            send "&7%arg-1% haven't joined the server yet."
            stop

on join:
    set network variable {hasjoined.%player's uuid%} to true
    if network variable {seconds::%player's uuid%} isn't set:
        set network variable {seconds::%player's uuid%} to 0
    if network variable {minutes::%player's uuid%} isn't set:
        set network variable {minutes::%player's uuid%} to 0
    if network variable {hours::%player's uuid%} isn't set:
        set network variable {hours::%player's uuid%} to 0

every 1 second:
    loop all players:
        set network variable {seconds::%loop-player's uuid%} to network variable {seconds::%loop-player's uuid%} + 1
        if network variable {seconds::%loop-player's uuid%} is 60:
            set network variable {seconds::%loop-player's uuid%} to 0
            set network variable {minutes::%loop-player's uuid%} to network variable {minutes::%loop-player's uuid%} + 1
            if network variable {minutes::%loop-player's uuid%} is 60:
                set network variable {minutes::%loop-player's uuid%} to 0
                set network variable {hours::%loop-player's uuid%} to network variable {hours::%loop-player's uuid%} + 1
 
Status
Not open for further replies.