location variables

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

dudle

Active Member
Jan 31, 2017
135
0
16
45
I think that I'm having an issue with location variables. Whenever I unload a world using any of world management plugins and then load it again, and teleport to to that location variable, it'd just teleport to the same location (XYZ) but in a random world (most prob the one i'm in at the moment of teleportation)
What I want to achieve is having worlds that no matter if they get unloaded and then loaded again, their location variables (which btw ARENT {_localvariables}) will be "saved" and work fine.
however, by the way, when I restart the server, and that world IS loaded before the restart/stop, if I teleport to that location variable it'd tp me to the correct place.

How can I fix this? thanks
 
You can't fix this sadly, when a world is unloaded, the world from that location is nulled due to it not existing anymore. A workaround however would be saving it as a text and then parsing it to a location when the world is loaded, so it isn't nulled that way.
 
  • Like
Reactions: dudle
Status
Not open for further replies.