Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- local nDir = tArgs[1]
- if not nDir then
- print("Usage: turn <direction>")
- print("Valid directions: L, R")
- return
- end
- if nDir == "l" then
- turtle.turnLeft()
- return
- end
- if nDir == "r" then
- turtle.turnRight()
- return
- end
- print("You must enter a valid direction.")
- print("Valid directions: L, R")
Advertisement
Add Comment
Please, Sign In to add comment