Skript error

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

Status
Not open for further replies.

kangjaeuk7

Member
Jan 13, 2020
2
0
0
24
I made 3x3 hoe skript. When I rightclick with hoe, the clicked block is grass. Then based on grass block change all the grass block in 3x3 into farmland. So I writed code but this is wrong code. What should I do?

function fill(loc: location, block: itemtype):
loop 1 times:
loop blocks in radius 1 around {_loc}:
if loop-block is grass:
set loop-block to {_block}
fill(location of , {_block})

on rightclick with wooden hoe:
if event-block is grass:
fill(location of event-block, farmland)
 
Use "grass block" instead of "grass", if you use "grass" the script will start checking for tall grass.
 
Status
Not open for further replies.