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.

%Region% or %region at player% does not work | No error

Discussion in 'Skript' started by sOxTw, Oct 3, 2018.

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

    sOxTw Member

    Joined:
    Jan 27, 2017
    Messages:
    35
    Likes Received:
    2
    The problem that I am having, is that when using.
    on region enter | on region leave, it does not detect the regions and does not execute any conditional that I specify.

    Code #1:
    Code (Skript):
    1. on region enter | on region leave:
    2.     wait 5 ticks
    3.     if %region at player% contains "<NombreRegion>":
    4.         send "<Messge>" to player
    5.         stop
    Code #2:
    Code (Skript):
    1. on region enter | on region leave:
    2.     wait 5 ticks
    3.     if %region at player% contains "<NombreRegion> in <World>":
    4.         send "<Messge>" to player
    5.         stop
    Code #3:
    Code (Skript):
    1. on region enter | on region leave:
    2.     wait 5 ticks
    3.     if %region% is "<NombreRegion> in <World>":
    4.         send "<Messge>" to player
    5.         stop
    None of these code blocks is working.

    Skript: 2.2-dev25
    Addon: SkQuery 3
    WorldGuard: 5.8
     
  2. Uzumaki

    Uzumaki Well-Known Member

    Joined:
    Feb 20, 2017
    Messages:
    310
    Likes Received:
    10
    Code (Skript):
    1. "%region at player%"
     
    • Agree Agree x 1
  3. sOxTw

    sOxTw Member

    Joined:
    Jan 27, 2017
    Messages:
    35
    Likes Received:
    2
    Forgive my answer, but at least you took a second to read the publication?

    Specify that the code does not work and use %region at player%.

    I do not understand how they help in this way, whenever someone has a problem, I try to respond as well as possible. They do not even read what you write.
     
  4. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    They probably looked at your code once and saw the error immediately since it's obvious. Also, if you took the time to test their answer, that would help you a lot.
     
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    Uzumaki just told you exactly what to use
    Code (Skript):
    1. "%region at player%"
    as in
    Code (Skript):
    1. if "%region at player%" contains "some region':
    Have you tried the code that Uzumaki gave you? Because its correct, I have used this dozens of times.

    Also I believe you can use
    Code (Skript):
    1. "%event-region%"
     
  6. DroidVengeance

    Supporter ++

    Joined:
    Jan 27, 2017
    Messages:
    19
    Likes Received:
    2
    In other words, place quotes around %region at player% like Uzumaki and ShaneBee mentioned.

    Yes:
    Code (Skript):
    1. "%region at player%"
    No:
    Code (Skript):
    1. %region at player%
     
  7. sOxTw

    sOxTw Member

    Joined:
    Jan 27, 2017
    Messages:
    35
    Likes Received:
    2
    It is still the same. Be with "" or without "" since the string in a query is compared as String and not as data.
    Also and tried to use
    set {_RegionAt} to "%region at player%" or set {_RegionAt} to region at player in a:
    if "% {_ RegionAt}%" contains "name region"

    Nothing takes the region. There is no way to detect the region, neither in an event of entry into a region nor in a command event or anything.

    IT DOES NOT WORK "%region at player%" neither %region at player%. It is something incredible since in another server with the same characteristics of versions of plugins (One is Survival and the other Skyblock) It works perfectly.

    Same version of Skript, SkQuery and WorldGuard
     
  8. Efnilite

    Supporter

    Joined:
    May 12, 2018
    Messages:
    218
    Likes Received:
    15
    Medals:
    try using seperate events, since i've never seen an event like this
    Code (Skript):
    1. on region enter | on region leave:
    if i were you i'd try to split them

    also it probably doesnt work because you dont have the lastest skript version, so try downloading dev 36 here (https://github.com/SkriptLang/Skript/releases/dev36)
     
  9. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    I agree with Efnilite here.. I have never seen an event done that way. Since a line doesn't mean anything in programming Im going to assume it gives you an error
     
  10. sOxTw

    sOxTw Member

    Joined:
    Jan 27, 2017
    Messages:
    35
    Likes Received:
    2
    It is only by way of example, I do not use events separated by "!".
    It still does not work and I can not find any reason for it.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...