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.

Solved If block at {_x} {_y} {_z} is {_block}

Discussion in 'Skript' started by Computerize, May 6, 2020.

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

    Computerize Member

    Joined:
    Oct 10, 2019
    Messages:
    38
    Likes Received:
    0
    Code (Text):
    1.   loop all players:
    2.     set {_x} to x-coord of loop-player
    3.     set {_y} to y-coord of loop-player
    4.     set {_z} to z-coord of loop-player
    5.     set {_totalUp} to 0
    6.     if block at {_x} {_y} {_z} is "jungle wood bark block":
    7.       loop 25 times:
    8.         if block at {_x} {_y} {_z} is jungle wood bark block:
    9.           add 1 to {_y}
    10.           add 1 to {_totalUp}
    11.         else:
    12.           add 1 to {_y}
    13.           add 1 to {_totalUp}
    14.           if block at {_x} {_y} {_z} isn't jungle wood bark block:
    15.             execute console command "/pex user %loop-player% add minecraft.command.tp"
    16.             make loop-player execute command "/tp ~ ~%{_totalUp}% ~"
    17.             execute console command "/pex user %loop-player% remove minecraft.command.tp"
    The code above gives me the following error:
    "Can't compare 'block at {_x} {_y} {_z}' with a text" - (Line 6)
    Is there any alternative to do something like this?
     
  2. Best Answer:
    Post #2 by Abdera7mane, May 6, 2020
  3. Abdera7mane

    Abdera7mane Active Member

    Joined:
    Aug 18, 2019
    Messages:
    56
    Likes Received:
    7
    you forgot to seperate the coordinates with a commma.
    Code (Text):
    1. block at {_x}, {_y} and {_z}
     
    • Useful Useful x 1
  4. Computerize

    Computerize Member

    Joined:
    Oct 10, 2019
    Messages:
    38
    Likes Received:
    0
    thank you
     
Thread Status:
Not open for further replies.

Share This Page

Loading...