Advertisement
Post_maphone

Untitled

Nov 26th, 2020 (edited)
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.24 KB | None | 0 0
  1. local distance = io.read()-- gets the first argument from the user
  2. if distance ~= nil then
  3.  distance = tonumber (distance) -- make it a number
  4.  for i = 1, distance do
  5.    turtle.forward()
  6.  end
  7. else
  8.  print ("Did not specify distance.")
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement