Loop doesn't work

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

_PAPER_PLANE_

Member
Jan 21, 2022
41
0
6
This script was found here, and I have made some slight modifications on my own, which do not affect its functionality. However, after updating to skript 2.8.0, the loop section seems unresponsive. I've checked the update log, but I still can't figure out what the issue is.
No error message.

Code:
function chain(b: block, n: integer):
    wait 1 tick
    {_n} is less than 50
    add 1 to {_n}
    loop blocks in radius 2 around {_b}:
        loop-block is any log
        loop blocks above loop-block:
            loop-block-2 is air:
                block above loop-block-2 is air
                exit 1 loop
            exit 1 loop
        loop blocks above loop-block:
            loop-block-2 is any leaves
            chain(loop-block-1, {_n})
            break loop-block-1
            wait 10 tick
            
on break of any log:
    name of tool is "special axe"
    loop blocks above event-block:
        loop-block is any leaves:
            send event-location to player
            loop all blocks in radius 2 of loop-block:
                loop-block-2 is any leaves
                add 1 to {_l}
                send {_l} to player
            {_l} > 7
            set {_tree} to true
    {_tree} is true:
        chain(event-block, 0)
 
Last edited:
Underneath this post, someone updated a script in August 2023, and I used it. (here) Also, I already posted code in the comments with spoiler.
 
Yes, I have debugged it, and it fails to pass on first loop.
Code:
loop blocks in radius 2 around {_b}:
and
Code:
loop blocks above event-block:
 
Last edited: