This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Thesinnner's profile picture

(Lua error)

Started by Thesinnner, 24 September 2012 - 09:24 AM
Thesinnner #1
Posted 24 September 2012 - 11:24 AM
So i am a newby at computercraft and im trying to get a turtle to make a house for me with the use of functions to make it easier but im doing something wrong and have been trying to figure it out for an hour now so could somebody look at my code and tell me what it is i have done wrong. Also when i use the program nothing happens and it has fuel.



function wallOne()
for i = 1, 7 do
turtle.place()
turtle.up()
turtle.place()
turtle.up()
turtle.place()
turtle.back()
turtle.place()
turtle.down()
turtle.place()
turtle.down()
turtle.place()
turtle.back()
end


function corner()
turtle.turnLeft()
turtle.forward()
turtle.turnRight()
turtle.forward()
turtle.turnRight()
end


wallOne()
corner()
end
Kazimir #2
Posted 24 September 2012 - 11:39 AM

function wallOne()
for i = 1, 7 do
  turtle.place()
  turtle.up()
  turtle.place()
  turtle.up()
  turtle.place()
  turtle.back()
  turtle.place()
  turtle.down()
  turtle.place()
  turtle.down()
  turtle.place()
  turtle.back()
end
end

function corner()
  turtle.turnLeft()
  turtle.forward()
  turtle.turnRight()
  turtle.forward()
  turtle.turnRight()
end

wallOne()
corner()
Thesinnner #3
Posted 24 September 2012 - 12:04 PM
Oh god so simple XD thank you