Posted 12 February 2014 - 12:13 PM
Okay so im am trying to pull two variables from a single write line but every time I think I have figured out I find a flaw in the idea. I really would like to just make one write line and have the user put in two variables EX:
This is my goal to achieve. To leanr how to accomplish this without doing:
function w(x)
turtle.forward(x)
end
write("which direction and how far? :")
mv = read ("", ..d)
--[[User types in: Forward 10
if mv == "forward" then
p(d)
print ("Okay, moving forward "..d.." blocks")
end
This is my goal to achieve. To leanr how to accomplish this without doing:
write ("Which direction:")
dir = read ()
if dir == "forward" then
write ("how far:")
dis = tostring.number(read ())
W(dis)
Elsif dir == ...ect
end
I have ran out of possible solutions and need to achieve this in order to carry out my next couple of program ideas. If someone could help by lending alittle of their knowledge and brain power to help me achieve this I would be forever grateful. Thanks.Edited on 12 February 2014 - 11:21 AM