Posted 19 January 2013 - 07:33 PM
ok so i have made a rubber farm program using the treetap turtle from misc peripherals mod(all it does is change turtle.dig to harvest rubber instead)
and i get this error
RubberFarm:56:Attempt to compare string with number expected, got string
I know what it means but i am not sure how to fix it
here is the code
and i get this error
RubberFarm:56:Attempt to compare string with number expected, got string
I know what it means but i am not sure how to fix it
here is the code
term.clear()
term.setCursorPos(1,1)
write("Distance Between Trees: ")
local space = read()
term.setCursorPos(1,2)
write("Number Of Rows: ")
local rows = read()
term.setCursorPos(1,3)
local function tap()
turtle.dig()
end
local function up()
while turtle.detect() == true do
turtle.select(2)
tap()
turtle.up()
end
end
local function down()
while turtle.detectDown() == false do
turtle.down()
end
end
local function tree()
for t=1,4 do
up()
down()
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
end
end
local function turnaround()
turtle.turnRight()
turtle.turnRight()
end
local function row()
for t=1,2 do
tree()
for s=1,space do
turtle.back()
end
turnaround()
end
end
while rows > 0 do
if rows ~= 0 then
row()
rows = rows - 1
if rows ~= 1 then
turtle.turnRight()
for rs=1,space do
turtle.forward()
end
turtle.turnLeft()
end
end
end