←  Ask a Pro

ComputerCraft | Programmable Computers for Minecraft

»

Another <eof> Error

QazzyTheMan's Photo QazzyTheMan 16 Mar 2014

I need help with an <eof> error. This piece of code is relatively simple, but apparently there is an issue with the end statements. I'm having difficulty finding the issue myself, so could some one help? Thanks.
The link to the code is here:
https://drive.google...dit?usp=sharing
Quote

CometWolf's Photo CometWolf 16 Mar 2014

lmfao, you printed it? Just upload it to pastebin...
There shouldn't be any end between an if and an else statement.
Quote

sci4me's Photo sci4me 16 Mar 2014

lmfao, never seen someone print it and screenshot it before.. there are code tags... with a spoiler...

Spoiler
Quote

adencraft2000's Photo adencraft2000 16 Mar 2014

Here is a DIRECT TYPE UP of the code (STILL BROKEN!)
http://pastebin.com/V5P6QXy7
Quote

Simon's Photo Simon 17 Mar 2014

if rs.getInput("left", true) then
  turtle.refuel()
  for i = 0,4,1 do
	turtle.select(3)
	turtle.place()
	turtle.select(2)
	for j = 0,4,1 do
	  turtle.place()
	end
	sleep(1)
	turtle.dig()
	turtle.forward()
  end
  for i = 0,4,1 do
	turtle.back()
  end
end -- Do not put that end there, you need the if statement to be open to use the else on the next line
else then
  os.reboot()
end

Edited by Simon, 17 March 2014 - 02:29 AM.
Quote