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

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

sOxTw

Member
Jan 27, 2017
35
2
8
30
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_language.skript:
on region enter | on region leave:
    wait 5 ticks
    if %region at player% contains "<NombreRegion>":
        send "<Messge>" to player
        stop

Code #2:
code_language.skript:
on region enter | on region leave:
    wait 5 ticks
    if %region at player% contains "<NombreRegion> in <World>":
        send "<Messge>" to player
        stop

Code #3:
code_language.skript:
on region enter | on region leave:
    wait 5 ticks
    if %region% is "<NombreRegion> in <World>":
        send "<Messge>" to player
        stop

None of these code blocks is working.

Skript: 2.2-dev25
Addon: SkQuery 3
WorldGuard: 5.8
 
code_language.skript:
"%region at player%"
Forgive my answer, but at least you took a second to read the publication?

Code #1:
code_language.skript:
on region enter | on region leave:
    wait 5 ticks
    if %region at player% contains "<NombreRegion>":
        send "<Messge>" to player
        stop
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.
 
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.
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.
 
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.
Uzumaki just told you exactly what to use
code_language.skript:
"%region at player%"

as in
code_language.skript:
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_language.skript:
"%event-region%"
 
In other words, place quotes around %region at player% like Uzumaki and ShaneBee mentioned.

Yes:
code_language.skript:
"%region at player%"

No:
code_language.skript:
%region at player%
 
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
 
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
try using seperate events, since i've never seen an event like this
code_language.skript:
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)
 
try using seperate events, since i've never seen an event like this
code_language.skript:
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)
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
 
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
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.
 
Status
Not open for further replies.