On region exit: not working

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

Gamingwng

Member
Apr 23, 2020
3
0
0
28
So I'm writing this skript where when a player dies, they get into spectator mode. After that, if they try to leave the region "spleef", the event gets canceled, so that they can't leave the region. Everything is working except the part where they can't leave the region. It gives an error saying "can't understand the event 'on region exit'"

Here is the code:

Code:
on region exit:
    if "%event-region%" contains "spleef":
        if {spleefgame} is true:
            cancel event
        stop

I also tried using %region% instead of %event-region% but I had no luck with that.

I even tried the following:
Code:
on region exit:
    send "test" to player

Any help would be appreciated :emoji_slight_smile:

Edit: I have the latest versions of skript, WorldGuard and FAWE
 
"Latest" is not a version, tell me your current skript version, not "latest"

Edit: on region exit: event works for me, my skript version is 2.2dev36 if your wondering.

More Edit: Once you fix your skript version, you can use this example:

Code:
on region exit:
    if "%event-region%" contains "<the region player is at>":
        cancel event
        send "You cannot leave! HAHAHAHA"
 
Last edited:
Status
Not open for further replies.