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.

event-block is not a date (help still needed)

Discussion in 'Skript' started by oHeckGage, Apr 2, 2020.

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

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    106
    Likes Received:
    5
    Code (Text):
    1.  
    2. on place:
    3.     if event-block is a composter:
    4.         loop all blocks in radius of 5 from event-block:
    5.             if loop-block is fully grown wheat plant:
    6.                 wait 4 seconds
    7.                 set loop-block to air
    8.                 loop all blocks in radius of 5 of loop-block:
    9.                     if loop-block is chest:
    10.                         add 2 wheat into inventory
    11.             if loop-block is fully grown carrot plant:
    12.                 wait 4 seconds
    13.                 set loop-block to air
    14.                 loop all blocks in radius of 5 of loop-block:
    15.                     if loop-block is chest:
    16.                         add 2 wheat into inventory
    17.             if loop-block is fully grown potato plant:
    18.                 wait 4 seconds
    19.                 set loop-block to air
    20.                 loop all blocks in radius of 5 of loop-block:
    21.                     if loop-block is chest:
    22.                         add 2 wheat into inventory
    So I want to make an auto harvester and on line 3 it says that event-block is not a date. What I want it to do is loop all the blocks in a radius of 5 from event-block
     
  2. SpawnRusher

    Supporter

    Joined:
    Jan 9, 2020
    Messages:
    8
    Likes Received:
    0
    use
    Code (Text):
    1. radius of 5 around event-block
     
  3. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    106
    Likes Received:
    5
    Doesn't work
     
  4. ZeyKra_

    ZeyKra_ Active Member

    Joined:
    Dec 12, 2019
    Messages:
    109
    Likes Received:
    2
    Code (Text):
    1. loop all blocks in radius 5 of event-block:
     
  5. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    106
    Likes Received:
    5
    Already tried that
     
  6. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    Remove the 'of' in line 3 (loop all blocks in radius of 5 from event-block)
    And replace 'from' with 'around'
     
  7. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    106
    Likes Received:
    5
    Doesn't work still

    Error:
    Can't understand this loop: 'loop all blocks in a radius of 5 around event-block'
     
  8. ZeyKra_

    ZeyKra_ Active Member

    Joined:
    Dec 12, 2019
    Messages:
    109
    Likes Received:
    2
    What is your skript version ?
    What is you Spigot Version
    What addon you've installed on your server ?
     
  9. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    106
    Likes Received:
    5
    I am on Minehut so idk my Skript and Spigot versions
    Addons: skBee skQuery TuSKe skRayFall
     
  10. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    You didn't remove the 'of'
     
  11. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    106
    Likes Received:
    5
    I did but I must've not saved that version because looking at my code, I have it removed

    Edit: Still doesn't work
     
  12. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    Current code, skript version, MC version
     
  13. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    106
    Likes Received:
    5
    Code (Text):
    1.  
    2. every 2 seconds in world "season2":
    3.     loop all blocks:
    4.         if loop-block-1 is a composter:
    5.             set {autoharvcomp} to {_loc} of loop-block
    6.             loop all blocks in radius 5 around {autoharvcomp}:
    7.                 if loop-block-2 is fully grown wheat plant:
    8.                     set block at loop-block-2 to freshly planted wheat plant
    9.                     loop all blocks in radius 5 around {autoharvcomp}:
    10.                         if loop-block-3 is chest:
    11.                             set {autoharvchest} to block at loop-block-3
    12.                             add 2 wheat to {autoharvchest}'s inventory
    I tried going at a different approach and it shows no errors but doesn't work
     
  14. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    What's this? That doesn't make sense
    set {autoharvcomp} to {_loc} of loop-block
     
    • Funny Funny x 1
  15. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    106
    Likes Received:
    5
    {autoharvestercomposter}

    If that doesn't show what doesn't make sense, tell me what about that doesn't make sense lmao
     
  16. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    {_loc} of loop-block. No No no. That's not an expression
     
  17. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    106
    Likes Received:
    5
    Can you help me then? I really need help lmao people are starting to leave my server. Only have 3 people on rn
     
  18. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    What are you thinking? You want the location but how is skript supposed to know what {_loc} is? You can name a variable however you like and set it to whatever you like so that doesn't make sense. Replace it with "location"
     
  19. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    106
    Likes Received:
    5
    Doesn't work. I already tried that and it said loop-block is not a location. I am pretty new to skript, as I joined in March and started in like February.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...