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.
Wimpy Question But I'm New
Started by sekots, Jul 25 2013 07:56 PM
4 replies to this topic
#1
Posted 25 July 2013 - 07:56 PM
#2
Posted 25 July 2013 - 11:14 PM
Split into new topic.
Movement functions don't take arguments:
or:
Movement functions don't take arguments:
turtle.up() turtle.up() turtle.up()
or:
for i = 1, 3 do turtle.up() end
#3
Posted 26 July 2013 - 04: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
#4
Posted 27 July 2013 - 04:57 AM
you don't have to put anything in the (). when ever there is () doesn't mean you have to enter something.
#5
Posted 30 July 2013 - 05:29 AM
Another alternative:
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.
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.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











