1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Global variables problem.

Discussion in 'Skript' started by GDude_, Mar 22, 2021.

Thread Status:
Not open for further replies.
  1. GDude_

    GDude_ Member

    Joined:
    Mar 17, 2021
    Messages:
    1
    Likes Received:
    0
    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 (Text):
    1. command /setgv [<text>]:
    2.     trigger:
    3.         set network variable {nv::%player%} to "%arg-1%"
    4.         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 (Text):
    1. command /getgv:
    2.     trigger:
    3.         set {_nv} to network variable {nv::%player%}
    4.         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.


    --- Double Post Merged, Apr 3, 2021, Original Post Date: Mar 22, 2021 ---
    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.
     
    #1 GDude_, Apr 3, 2021
    Last edited: Apr 3, 2021
Thread Status:
Not open for further replies.

Share This Page

Loading...