Solved Making an Area with Skript?

  • 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.
Okay so I changed it to Global.
Then i made first corner with /1, then second with /2. Then
if i do /check anywhere out of that place, it will say yes, but im 500 blocks away!
And it is spamming "ok" in chat. But i'm not in that place?

code_language.skript:
command /1:
    trigger:
        set {Ruinz1} to location of location of player
        send "works" to player
 
command /2:
    trigger:
        set {Ruinz2} to location of location of player
        send "works" to player
      
every second in "world":
    loop all players:
        if loop-player is within {Ruinz1} to {Ruinz2}:
            send "ok" to loop-player
            stop
        else:
            stop
          
command /check:
    trigger:
        loop all players:
            if loop-player is within {Ruinz1} to {Ruinz2}:
                send "yes" to loop-player
            else:
                send "no" to loop-player

This code works flawlessly for me.
 
It doesn't get saved in variables file and when i restarted my server it spammed "outside", i did /1, /2, then it said ok
and went outside and boom, spamming "ok again" when i'm 200 blocks away
[doublepost=1495492800,1495492764][/doublepost]Skript 2.2 dev 25
Spigot 1.8.9
[doublepost=1495496978][/doublepost]Shoutout to @White thanks for helping me
 
Status
Not open for further replies.