Solved If line is

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

MeHow

Active Member
Feb 6, 2017
140
13
18
Lithuania
Hello, i have some problems with line is
Code:
code_language.skript:
every 20 seconds in "world":
    loop all blocks:
        if loop-block is sign:
            if line 2 of loop-block is "Drill":
                set {_loc} to location of loop-block

Error:

code_language.skript:
[20:15:40 ERROR]: There's no loop that matches 'loop-block is "Drill"' (mars.sk, line 224: if line 2 of loop-block is "Drill":')
[20:15:40 ERROR]: There's no loop that matches 'loop-block is "WaterPump"' (mars.sk, line 234: if line 2 of loop-block is "WaterPump":')

Skript: 2.2
Server: 1.11.2


Thanks for help
 
Hello, i have some problems with line is
Code:
code_language.skript:
every 20 seconds in "world":
    loop all blocks:
        if loop-block is sign:
            if line 2 of loop-block is "Drill":
                set {_loc} to location of loop-block

Error:

code_language.skript:
[20:15:40 ERROR]: There's no loop that matches 'loop-block is "Drill"' (mars.sk, line 224: if line 2 of loop-block is "Drill":')
[20:15:40 ERROR]: There's no loop that matches 'loop-block is "WaterPump"' (mars.sk, line 234: if line 2 of loop-block is "WaterPump":')

Skript: 2.2
Server: 1.11.2


Thanks for help
you can't loop all blocks
 
how i suppos to do this
code_language.skript:
            if loop-block is sign:
                if line 2 of loop-block is "Drill":
                    set {_loc} to location of loop-block
                    drawDot count 5, particle "blockcrack", material stone block, XYZ 0, 0, 0, center {_loc}, visibleRange 320, pulseDelay 0, keepFor 10 ticks
                    if line 3 of loop-block is "Level 1":
                        chance of 100%:
                            drop 1 hardened clay named "&fMars Block" at block 1 block above {_loc}
                        chance of 40%:
                            drop 1 stone at block 1 block above {_loc}   
                        chance of 10%:
                            drop 1 quartz named "&fOxygen" at block 1 block above {_loc}
without loop all blocks or near player :I
 
how i suppos to do this
code_language.skript:
            if loop-block is sign:
                if line 2 of loop-block is "Drill":
                    set {_loc} to location of loop-block
                    drawDot count 5, particle "blockcrack", material stone block, XYZ 0, 0, 0, center {_loc}, visibleRange 320, pulseDelay 0, keepFor 10 ticks
                    if line 3 of loop-block is "Level 1":
                        chance of 100%:
                            drop 1 hardened clay named "&fMars Block" at block 1 block above {_loc}
                        chance of 40%:
                            drop 1 stone at block 1 block above {_loc}  
                        chance of 10%:
                            drop 1 quartz named "&fOxygen" at block 1 block above {_loc}
without loop all blocks or near player :I
By saving the signs to a list variable and looping that instead. Looping all blocks would without a doubt hang your server, causing spigot to force crash it eventually
 
Status
Not open for further replies.