Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- simple line program
- print "Hello! I will build a line by going forward and placing blocks under me!"
- print "Please put blocks in my first slot. (top left)"
- function main()
- getInfo()
- line()
- end
- function getInfo()
- print "How long do you want your line?"
- x = tonumber(io.read())
- if x < 100 then
- print "starting line!"
- -- else if x > 100 then
- -- print "Number must be less then 100"
- else
- print "Uhoh, what happened?"
- end
- end
- function line()
- -- for i=0, MAX, Increment
- for i=0,x do
- turtle.forward()
- turtle.placeDown()
- print(i)
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement