1

Computer craft turtle program help

tricast01's Avatar tricast0112/21/12 5:05 pm
1 emeralds 770 3
6/2/2013 7:05 pm
Poopypig's Avatar Poopypig
Okay I was playing on FTB and was working w/ my mining turtle. to test what i learned so far w/ turtles i made a small program called towerUp.

you type towerUp and then how tall you want it. ex: towerUp 10

so I input towerUp 10 and let it run. It only places three blocks before quitting.

if you can help me, here's the code:

local args = { ... }
local i = 0

while #args .= i do
turtle.place()
turtle.up()
i = i + 1
end


If you can succesfully resolve this issue I'll subscribe to you.
Posted by tricast01's Avatar
tricast01
Level 33 : Artisan Artist
21

Create an account or sign in to comment.

3

Poopypig
06/02/2013 7:05 pm
Level 1 : New Miner
Poopypig's Avatar
Happy to help.
I say:

command:towerup <quantity> <widthxwidth>

towerUp()
function()
quantity(hieght)
width(widthxwidth)
check for blocks to do so, say "able", if not enough, say "unable, fill with blocks"
end.
turtle.goUp()
turtle.place(widthxwidth)
turtle.repeat(heght)
end.
end.
1
jsoft
12/21/2012 5:58 pm
Level 56 : Grandmaster Geek
jsoft's Avatar
tricast01Okay I was playing on FTB and was working w/ my mining turtle. to test what i learned so far w/ turtles i made a small program called towerUp.

you type towerUp and then how tall you want it. ex: towerUp 10

so I input towerUp 10 and let it run. It only places three blocks before quitting.

if you can help me, here's the code:

local args = { ... }
local i = 0

while #args .= i do
turtle.place()
turtle.up()
i = i + 1
end


If you can succesfully resolve this issue I'll subscribe to you.


I tryed to handle this a lil differntly. Here is my code

turtle.select(1)
local Args = {...}
if #Args < 1 then -- Checks to make sure they supplied a valid number to go up
print("The correct syntax is towerUp [#]")
else
local i = 0
while i < tonumber(Args[1]) do -- Checks if i is less then the number supplied
turtle.place()
turtle.up()
i = i + 1
end
end


That code worked for me so I hope this helps
1
tricast01
12/21/2012 5:19 pm
Level 33 : Artisan Artist
tricast01's Avatar
>:( No one can help me?
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome