Jump to content




<eof> expected error


  • You cannot reply to this topic
4 replies to this topic

#1 markandmc

  • New Members
  • 2 posts

Posted 23 December 2013 - 04:58 AM

So I'm getting this <eof> error everytime I try to run this program
turtle.refuel()
turtle.detect()
	   turtle.dig()
	   turtle.forward()
	   turtle.digUp()
	   turtle.turnRight
	   turtle.dig()
	   turtle.forward()
	   turtle.digUp()
	   turtle.turnLeft()
	   turtle.turnLeft()
	   turtle.forward()
	   turtle.forward() 
	   turtle.forward()
	 
end


#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 23 December 2013 - 09:30 AM

You need an if statement if you want that turtle.detect to do anything:

if turtle.detect() then


#3 TheOddByte

    Lazy Coder

  • Members
  • 1,607 posts
  • LocationSweden

Posted 23 December 2013 - 09:39 AM

Since you don't have an if statement/loop/function or something there is no need for an end there.
But my guess is you want to use 'if turtle.detect() then' as Lyqyd posted above.

#4 markandmc

  • New Members
  • 2 posts

Posted 23 December 2013 - 08:45 PM

Thanks, I'll try.

#5 Alice

  • Members
  • 429 posts
  • LocationBehind you.

Posted 23 December 2013 - 11:11 PM

When you're done trying, your code should look like this
Spoiler






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users