Jump to content




For Problems(I think)


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

#1 kevin105008

  • New Members
  • 2 posts

Posted 18 March 2014 - 11:15 AM

I am having some difficulty with my code, and I believe it's the for loop. I'm new to lua but I know several other languages, so any help would be great, thanks.
Code:

  • while true do

  • rednet.open("right")

  • local id, msg = rednet.receive()

  • if msg == ("mine") then

  • turtle.select(1)

  • turtle.place()

  • sleep(7)

  • for i = 1..10 do

  • turtle.select(i)

  • turtle.drop()

  • end

  • turtle.select(1)

  • turtle.dig()

  • end

  • end


#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 18 March 2014 - 02:26 PM

Your for loop should start with this:

for i = 1, 10 do


#3 apemanzilla

  • Members
  • 1,421 posts

Posted 18 March 2014 - 03:32 PM

What Lyqyd said. Also, code you wrap code inside [code] tags or a spoiler next time?

#4 kevin105008

  • New Members
  • 2 posts

Posted 18 March 2014 - 07:01 PM

Thanks, im kinda new to this, so any help is greatly appreciated





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users