3 posts
Posted 10 January 2013 - 12:13 AM
WRONG SECTION SORRY I OPENED THE ASK A PRO TAB AND THE TUTORIAL TAB. CLICKED THE WRONG ONE. SORRY! D:
http://pastebin.com/XW5C4SGzJust wrote the above treetap program only to find out that it dosent work D:
It gives me the following error:
bios: 338: [string "treetap"] :22: '=' expected
I've spent quite some time checking my code again and again, I really dont see why the system tells me a '=' is expected at line 22, which is just calling up a turtle.dig() function.
D:
248 posts
Posted 10 January 2013 - 04:04 AM
WRONG SECTION SORRY I OPENED THE ASK A PRO TAB AND THE TUTORIAL TAB. CLICKED THE WRONG ONE. SORRY! D:
http://pastebin.com/XW5C4SGzJust wrote the above treetap program only to find out that it dosent work D:
It gives me the following error:
bios: 338: [string "treetap"] :22: '=' expected
I've spent quite some time checking my code again and again, I really dont see why the system tells me a '=' is expected at line 22, which is just calling up a turtle.dig() function.
D:
Line 21, you're missing () at the end of turtle.turnRight
Fixed your code:
function tappo()
for i = 1,2 do
for i = 1,7 do
turtle.dig()
turtle.up()
end
turtle.dig()
turtle.turnLeft()
turtle.forward()
turtle.turnRight()
turtle.forward()
turtle.turnRight()
for i = 1,7 do
turtle.down()
turtle.dig()
end
turtle.turnLeft()
turtle.forward()
turtle.turnRight()
turtle.forward()
turtle.turnRight()
end
end
function t.forward(blocks)
blocks = blocks or 1
for i = 1,blocks do
turtle.forward()
end
end
function t.backward(blocks)
blocks = blocks or 1
for i = 1,blocks do
turtle.backward()
end
end
function t.turnRight(blocks)
blocks = blocks or 1
for i = 1,blocks do
turtle.turnRight()
end
end
function t.turnLeft(blocks)
blocks = blocks or 1
for i = 1,blocks do
turtle.turnLeft()
end
end
t.forward(2)
tappo()
t.turnRight(2)
turtle.forward()
tappo()
for i = 1,3 do
turtle.turnRight()
t.forward(3)
turtle.turnLeft()
tappo()
end
for i = 1,3 do
t.turnRight(2)
turtle.forward()
tappo()
end
turtle.turnRight()
t.forward(3)
turtle.turnLeft()
tappo()
turtle.turnLeft()
t.forward(8)
turtle.turnRight()
t.forward(6)
turtle.turnLeft()
turtle.drop()
t.turnRight(2)
1548 posts
Location
That dark shadow under your bed...
Posted 10 January 2013 - 09:07 PM
if you want to move a post report it and in the report field ask to have it moved
3 posts
Posted 10 January 2013 - 09:43 PM
thanks! =D didnt notice that =D
WRONG SECTION SORRY I OPENED THE ASK A PRO TAB AND THE TUTORIAL TAB. CLICKED THE WRONG ONE. SORRY! D:
http://pastebin.com/XW5C4SGz Just wrote the above treetap program only to find out that it dosent work D: It gives me the following error: bios: 338: [string "treetap"] :22: '=' expected I've spent quite some time checking my code again and again, I really dont see why the system tells me a '=' is expected at line 22, which is just calling up a turtle.dig() function. D:
Line 21, you're missing () at the end of turtle.turnRight Fixed your code:
function tappo() for i = 1,2 do for i = 1,7 do turtle.dig() turtle.up() end turtle.dig() turtle.turnLeft() turtle.forward() turtle.turnRight() turtle.forward() turtle.turnRight() for i = 1,7 do turtle.down() turtle.dig() end turtle.turnLeft() turtle.forward() turtle.turnRight() turtle.forward() turtle.turnRight() end end function t.forward(blocks) blocks = blocks or 1 for i = 1,blocks do turtle.forward() end end function t.backward(blocks) blocks = blocks or 1 for i = 1,blocks do turtle.backward() end end function t.turnRight(blocks) blocks = blocks or 1 for i = 1,blocks do turtle.turnRight() end end function t.turnLeft(blocks) blocks = blocks or 1 for i = 1,blocks do turtle.turnLeft() end end t.forward(2) tappo() t.turnRight(2) turtle.forward() tappo() for i = 1,3 do turtle.turnRight() t.forward(3) turtle.turnLeft() tappo() end for i = 1,3 do t.turnRight(2) turtle.forward() tappo() end turtle.turnRight() t.forward(3) turtle.turnLeft() tappo() turtle.turnLeft() t.forward(8) turtle.turnRight() t.forward(6) turtle.turnLeft() turtle.drop() t.turnRight(2)
where is the report field? o.0 thanks though.
if you want to move a post report it and in the report field ask to have it moved
7508 posts
Location
Australia
Posted 10 January 2013 - 09:55 PM
where is the report field? o.0 thanks though.
beside the MultiQuote button