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.

The script does not work (no errors)

Discussion in 'Skript' started by Aawqq2112, Apr 6, 2021.

  1. Aawqq2112

    Aawqq2112 Member

    Joined:
    Apr 1, 2021
    Messages:
    10
    Likes Received:
    0
    What could be wrong? :emoji_frowning:
    Code (Text):
    1. on region enter:
    2.     if "%region at player%" is "cafe":
    3.         message "Welcome back to %region%!"
    4.         send "%player% just entered %region%!" to all members of the region
     
  2. TheRealUnderscore

    TheRealUnderscore New Member

    Joined:
    Mar 31, 2019
    Messages:
    5
    Likes Received:
    1
    A region isn't just the name of the region. A region is formatted as "region_name in world world_name" so it'll never be just "cafe."
    Your fix would be to use
    Code (Text):
    1. event-region
    and replace "is" with "contains" like so:
    Code (Text):
    1. on region enter:
    2.     if "%event-region%" contains "cafe":
    3.         do whatever
     
  3. Aawqq2112

    Aawqq2112 Member

    Joined:
    Apr 1, 2021
    Messages:
    10
    Likes Received:
    0
    It now does not work as I need, I need that if a player has a "cafe" region in his possession, then a certain action is performed
     
  4. pokw

    pokw Member

    Joined:
    Jun 3, 2019
    Messages:
    48
    Likes Received:
    1
    Code (Text):
    1.  
    2. on region enter:
    3.   if "%region at player%" contains "cafe":
    4.     # do whatever
    5.  
    I just combined both ideas and this is what I always use and it works for me, try this.
     
  5. Aawqq2112

    Aawqq2112 Member

    Joined:
    Apr 1, 2021
    Messages:
    10
    Likes Received:
    0
    thanks!
     
  6. pokw

    pokw Member

    Joined:
    Jun 3, 2019
    Messages:
    48
    Likes Received:
    1
    No problem! If this solved your problem please mark the post as solved and my answer as "Best answer" for others looking at this thread. Thanks!
     

Share This Page

Loading...