Posted 25 May 2013 - 12:01 PM
I'm working on a turtle program that digs out and builds rooms and tunnels for me. I created a tunnel program which works fine and dandy, but am running into issues with creating my first room program.
These are the functions I have at the top of my code. The issue is with the makeFloor function - when I put in the number 2 for slot 2, it works fine. Putting in number 3 for slot 3 causes the following error:
bios:337: [string "intersection"]:1: '=' expected
where intersection is the name assigned to the program on my turtle.
I've also tried just setting turtle.select(3) to the bottom instead of the makeFloor function and it's still throwing out the same error. Again, turtle.select(2) works fine.
Any ideas?
Edit: Now for some reason my tunneling program is no longer working and throwing up the same error. Link to it http://pastebin.com/N2bKdg8J here
function clear()
if turtle.detect() then turtle.dig() end
end
function clearForward()
if turtle.detect() then turtle.dig() end
turtle.forward()
end
function clearUp()
if turtle.detectUp() then turtle.digUp() end
turtle.up()
end
function clearDown()
if turtle.detectDown() then turtle.digDown() end
end
function makeFloor(blockNo)
clearDown()
turtle.select(blockNo)
turtle.placeDown()
end
These are the functions I have at the top of my code. The issue is with the makeFloor function - when I put in the number 2 for slot 2, it works fine. Putting in number 3 for slot 3 causes the following error:
bios:337: [string "intersection"]:1: '=' expected
where intersection is the name assigned to the program on my turtle.
I've also tried just setting turtle.select(3) to the bottom instead of the makeFloor function and it's still throwing out the same error. Again, turtle.select(2) works fine.
Any ideas?
Edit: Now for some reason my tunneling program is no longer working and throwing up the same error. Link to it http://pastebin.com/N2bKdg8J here
Edited by