1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Skript error

Discussion in 'Skript' started by kangjaeuk7, Jan 13, 2020.

Thread Status:
Not open for further replies.
  1. kangjaeuk7

    kangjaeuk7 Member

    Joined:
    Jan 13, 2020
    Messages:
    2
    Likes Received:
    0
    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)
     
  2. Goose

    Goose Well-Known Member

    Joined:
    Nov 23, 2019
    Messages:
    402
    Likes Received:
    28
    Use "grass block" instead of "grass", if you use "grass" the script will start checking for tall grass.
     
  3. kangjaeuk7

    kangjaeuk7 Member

    Joined:
    Jan 13, 2020
    Messages:
    2
    Likes Received:
    0
    Same as before.
     
  4. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    332
    Likes Received:
    21
    use item instead of itemtype
     
Thread Status:
Not open for further replies.
Loading...