5 posts
Posted 08 October 2012 - 05:36 PM
movementMethods = {
turtle.forward(),
turtle.back(),
turtle.up(),
turtle.down()
}
while true do
local number = math.random(4)
movementMethods[number]
end
Output:
Also, how do I copy and paste inside the computer?? It just closes…
445 posts
Posted 08 October 2012 - 05:39 PM
You want the functions, not call them so
turtle.up instead of turtle.up()
then call them once retrieving them:
movementMethods = {
turtle.forward,
turtle.back,
turtle.up,
turtle.down
}
while true do
local number = math.random(4)
movementMethods[number]()
end
5 posts
Posted 08 October 2012 - 05:41 PM
Ohh, thanks for the quick help!
5 posts
Posted 08 October 2012 - 05:48 PM
Also how do I copy and paste when editing?
2217 posts
Location
3232235883
Posted 08 October 2012 - 05:52 PM
you cant, you can edit the file directly by going to /saves/<level>/computer/<id>/<program>
personally i would recommend np++ because it has syntax highlighting
if your on a server than you will have to use http/pastebin, check the wiki