compare 2 blocks at different location

  • 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 community!

    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.

DeDiamondPro

Member
Jul 20, 2020
2
0
0
Hi i am trying to give a number of how many blocks are correct but this does not seem to work
Code:
set {_score1} to 0
    loop 10 times:
        loop 10 times:
            set {_block1} to block at location -70+loop-value-1, 25, -182+loop-value-2 in world "speedpainters"
            set {_block2} to block at location -28+loop-value-1, 26, -182+loop-value-2 in world "speedpainters"
            if {_block1} = {_block2}:
                broadcast "found 1"
                add 1 to {_score1} 
        broadcast "%{_score1}%"
the blocks at some of the location are the smae but the if statement never triggers, after some research i have found out that this is probably because the block saves the location what is not the same but i dont now how to fix it.
Thanks in advance.
 
Last edited:
Status
Not open for further replies.