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.

Cant compare a location with a text

Discussion in 'Skript' started by Mamba, Apr 27, 2022.

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

    Mamba Member

    Joined:
    Feb 24, 2021
    Messages:
    13
    Likes Received:
    0
    Code (Text):
    1. every 1 tick:
    2.     loop all players:
    3.         if loop-player's location is "542, 122, 239":  
    4.                

    this script gives error "Cant compare a location with a text"
     
  2. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    yeah.. because a location isn't a string.
    And are you sure you want to use every 1 tick with loop all players?
     
  3. Practice

    Practice Member

    Joined:
    Apr 23, 2022
    Messages:
    37
    Likes Received:
    1
    Code (Text):
    1. if loop-player's location is location(542, 122, 239)
    You shouldn't loop all players every tick, it causes lag.
     
  4. Jayden13O

    Jayden13O Member

    Joined:
    Jun 9, 2021
    Messages:
    22
    Likes Received:
    1
    You could also do
    Code (Text):
    1. if "%loop-player's location%" is "542, 122, 239":
    if i'm correct
     
Thread Status:
Not open for further replies.

Share This Page

Loading...