#loop every 5 seconds

1 messages · Page 1 of 1 (latest)

robust imp
#

the problem that I have is that it works only for 2 inventories at a time I need it to work for more than 2 inventories at a time.

#
  loop {machine::*}:
    set {_name} to inventory name of loop-value
    set {_block} to loop-value
    if {_name} is "&6&lOutput":
      if facing of loop-value = east:
        set {_output} to block 1 east of loop-value
        if {_name} is "&6&lOutput":     
          if {_output}'s inventory has stone:
            if {_block}'s inventory has enough space for 1 stone:          
              broadcast "its doing it"
              remove 1 stone from {_output}'s inventory
              add 1 stone to {_block}'s inventory
              stop```
bronze kestrel
robust imp
bronze kestrel
#
function Machine(i: inventory):
  #code

every 5 seconds:
  loop:
    Machine(loop-value)
#

im not sure if "inventory" is a correct data type

robust imp
#

ok i try later and see thank you

robust imp
bronze kestrel
#

not that I know of