Posted 23 April 2014 - 06:50 AM
I began working on a piece of code that will place turtles and transfer programs. Nowhere near finished just testing what I got so far.
I keep getting a 15: attempt to index ? (a nil value)
If I do it manually in the Lua interface its fine. It doesn't help I'm really tired, and been writing code to go with this all day.
EDIT: Fixed code during paste
I keep getting a 15: attempt to index ? (a nil value)
If I do it manually in the Lua interface its fine. It doesn't help I'm really tired, and been writing code to go with this all day.
rednet = peripheral.wrap("left")
function place()
com = peripheral.wrap("front")
--select turtle slot
turtle.select(1)
turtle.place()
turtle.up()
--select diskDrive slot
turtle.select(2)
turtle.place()
--select floppy disk slot
turtle.select(3)
turtle.drop()
--TODO place transfer buildSignal as type()
--TODO place transfer buildWall as type()
turtle.down()
com.turnOn() -- This is line 15
turtle.up()
--grab disk
turtle.suck()
turtle.down()
sleep(5)
com.reboot()
turtle.up()
turtle.select(2)
turtle.dig()
turtle.down()
end
for i = 1, 3 do
turtle.forward()
end
place()
turtle.back()
turtle.back()
place()
EDIT: Fixed code during paste
Edited on 23 April 2014 - 04:52 AM