Solved Global variables problem.

  • 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 comminuty!

    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.

GDude_

Member
Mar 17, 2021
1
0
1
24
I need help with global variables because they don't work.
I get no errors with the code but it still doesn't work.

Skript Version: 2.5.3
I also have tried many other versions and more updated ones,
even dev ones and they still don't work.

Addons: Skungee, SkQuery, Ersatz, SkMorkaz, TuSKe, and SkRayFall

Just so you know I did check everywhere to solve this and I couldn't find any code that works.

My code for my first server:

This is supposed to set the global variable.
Code:
command /setgv [<text>]:
    trigger:
        set network variable {nv::%player%} to "%arg-1%"
        send "&aGlobal variable has been set to &e%arg-1%&a!"


My code for my second server:
This is supposed to get the variable after its set.
Code:
command /getgv:
    trigger:
        set {_nv} to network variable {nv::%player%}
        send "&aThe global variable returns with &e%{_nv}%&a."

Whenever I try this it comes out with <none>.
I get no console errors in my Proxy, or 2 Spigot Servers.
Please help me, and thank you.


[doublepost=1617420386,1616371343][/doublepost]I actually figured it out with LimeGlass' help. So I'm going to put this on Solved. If you want to know why this didn't work is because apparently ALPHA v2.0.0 of Skungee works with global variables.
 
Last edited:
Status
Not open for further replies.