loop-block is not a 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.

oHeckGage

Active Member
Mar 24, 2020
110
6
18
I have posted this multiple times and nobody has been able to solve it. I am trying to make a crop harvester skript but when I set the composter (the block that is going to be used for the harvester) variable for the location because if I don't do that, other errors pop-up but this is my code:


Code:
every 2 seconds in world "world":
    loop all blocks:
        if loop-block-1 is a composter:
            set {autoharvcomp} to location of loop-block-1
            loop all blocks in radius 5 around {autoharvcomp}:
                if loop-block-2 is fully grown wheat plant:
                    set block at loop-block-2 to freshly planted wheat plant
                    loop all blocks in radius 5 around {autoharvcomp}:
                        if loop-block-3 is chest:
                            set {autoharvchest} to block at loop-block-3
                            add 2 wheat to {autoharvchest}'s inventory
                        if loop-block-3 is hopper:
                            set {autoharvchest} to block at loop-block-3
                            add 2 wheat to {autoharvchest}'s inventory
                            exit loop

It's pretty simple but once I figure out that problem, I will add more to it. (I posted this for the first time in like Midish March)
 
Status
Not open for further replies.