Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- local direction = tArgs[1]
- local times = tArgs[2]
- if not direction then
- iox.colorPrint("No direction given: left or right", colors.red)
- return
- elseif direction ~= "left" and direction ~= "right" then
- iox.colorPrint("Invalid direction: "..direction..", use left or right", colors.red)
- return
- end
- if not times then
- times = 1
- end
- if direction == "left" then
- navigate.turnLeft(times)
- elseif direction == "right" then
- navigate.turnRight(times)
- end
Advertisement
Add Comment
Please, Sign In to add comment