1 posts
Posted 25 July 2013 - 08:56 PM
turtle.up(3) doesn't go up 3 times. It has no error, and it goes up 1 time. What am I supposed to put inside of the (). I've looked on the wiki but I can't find the list of codes for turtles.
8543 posts
Posted 26 July 2013 - 12:14 AM
Split into new topic.
Movement functions don't take arguments:
turtle.up()
turtle.up()
turtle.up()
or:
for i = 1, 3 do
turtle.up()
end
56 posts
Posted 26 July 2013 - 05:14 AM
You could make a function that does it though, a bit like this
function up(amount)
for i = 1, amount do
turtle.up()
end
end
52 posts
Posted 27 July 2013 - 05:57 AM
you don't have to put anything in the (). when ever there is () doesn't mean you have to enter something.
7 posts
Posted 30 July 2013 - 06:29 AM
Another alternative:
turtle._up = turtle.up
turtle.up = function(amt)
for i=1,amt do
turtle._up()
end
end
That will override the original turtle API function and provide a function similar to what Lord_Spelunky suggested. To me, it's cleaner when calling the function.