turtle coding

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

kekor

New Member
Jul 29, 2019
1
0
0
i keep getting a error in my coding
bios:338: [string "farm"]:16: 'end' expected (to close 'while' at line 13)

my code is
while true do
for i = 1, 4 do
turtle.attack()
turtle.turnleft()
turtle.dropDown()

repeat
until turtle.dropDown() == false
end

while false do
turtle.dropDown()
until turtle.drioDown() == false

repeat
until turtle.dropDown() == true
end
 

ahwtx

New Member
Jul 29, 2019
88
0
0
is that just a typo in your post or does your code really have: until turtle.drioDown() == false

that's line 13. if you do have that typo in your code, well then there you go.
 

CaseyRobinson

New Member
Jul 29, 2019
50
0
0
Behold the power of formatting:

Code:
while true do
  for i = 1, 4 do
    turtle.attack()
    turtle.turnleft()
    turtle.dropDown()
    repeat
    until turtle.dropDown() == false
  end
 
  while false do
    turtle.dropDown()
    until turtle.drioDown() == false  -- No 'repeat', is that allowed
 
    repeat
    until turtle.dropDown() == true
  end
 
--short one 'end' here to close the initial 'while'