#hwelp pls

1 messages · Page 1 of 1 (latest)

tawdry badge
#

''''command /generatemine:
permission: mine.generate
trigger:
send "&aGenerating a huge mine, please wait..."
set {_startX} to -199
set {_endX} to 199
set {_startZ} to -199
set {_endZ} to 199
set {_startY} to 1
set {_endY} to 80

    loop {_endX} - {_startX} + 1 times:  # Loop through X coordinates from -199 to 199
        set {_x} to {_startX} + (loop-number - 1)
        loop {_endZ} - {_startZ} + 1 times:  # Loop through Z coordinates from -199 to 199
            set {_z} to {_startZ} + (loop-number - 1)
            loop {_endY} - {_startY} + 1 times:  # Loop through Y coordinates from 1 to 80
                set {_y} to {_startY} + (loop-number - 1)
                set {_block} to stone
                set {_rand} to random integer between 1 and 100
                if {_y} <= 5:
                    if {_rand} <= 1:
                        set {_block} to diamond ore
                    else if {_rand} <= 3:
                        set {_block} to redstone ore
                else if {_y} <= 20:
                    if {_rand} <= 3:
                        set {_block} to gold ore
                    else if {_rand} <= 8:
                        set {_block} to lapis ore
                else if {_y} <= 40:
                    if {_rand} <= 6:
                        set {_block} to iron ore
                    else if {_rand} <= 14:
                        set {_block} to coal ore
                else if {_y} <= 60:
                    if {_rand} <= 12:
                        set {_block} to copper ore
                    else if {_rand} <= 25:
                        set {_block} to coal ore
                set block at {_x}, {_y}, {_z} to {_block}
    send "&aMine generation complete!"

'''

cloud rover
#

whats the problem

tawdry badge
#

it donut work

#

i can send errors

cloud rover
#

okay

tawdry badge
#

[20:50:26 INFO]: [Skript] Reloading generatemine.sk...
[20:50:26 INFO]: Line 15: (generatemine.sk)
[20:50:26 INFO]: There's no loop that matches 'loop-number - 1'
[20:50:26 INFO]: Line: set {_z} to {_startZ} + (loop-number - 1)
[20:50:26 INFO]:
[20:50:26 INFO]: Line 17: (generatemine.sk)
[20:50:26 INFO]: There's no loop that matches 'loop-number - 1'
[20:50:26 INFO]: Line: set {_y} to {_startY} + (loop-number - 1)
[20:50:26 INFO]:
[20:50:26 INFO]: Line 40: (generatemine.sk)
[20:50:26 INFO]: (the block at {_x}, {_y} and {_z}) can't be set to anything
[20:50:26 INFO]: Line: set block at {_x}, {_y}, {_z} to {_block}
[20:50:26 INFO]:
[20:50:26 INFO]: [Skript] Encountered 3 errors while reloading generatemine.sk! (245ms)

tawdry badge
#

plss someone help me

worn laurel
#

can you use code blocks

#

`, not '

#

and your loop errors are because you have nested loops, you need to specify which loop-number it is; from loop 1, loop 2, etc

#

and for the last one, thats not how locations work