Posted 17 August 2013 - 06:36 PM
Title: Railroad layer
I've been at it for a few hours, configuring the code, only making it worse. Now i don't even remember the one that was "close" to being finished. I got the code to repeat itself before, but now i can't even get it to do that. (so much for googling after other ways to deal with it)
What i want this code to do is, that the turtle will lay 10 ordinary railroad tracks and then 1 powered railroad track on each side of it, and a redstone torch in between, then repeat that.
So, what's wrong with this code? (or should i say right? lol)
and yeah. I'm totally new at this. Made my first script earlier today
I've been at it for a few hours, configuring the code, only making it worse. Now i don't even remember the one that was "close" to being finished. I got the code to repeat itself before, but now i can't even get it to do that. (so much for googling after other ways to deal with it)
What i want this code to do is, that the turtle will lay 10 ordinary railroad tracks and then 1 powered railroad track on each side of it, and a redstone torch in between, then repeat that.
So, what's wrong with this code? (or should i say right? lol)
Spoiler
i=0
a=0
If i<22 then
turtle.turnLeft()
turtle.select(1)
turtle.place()
turtle.turnLeft()
turtle.turnLeft()
turtle.place()
turtle.turnLeft()
turtle.forward
Print("laying rail")
a=a+1
I=i+1
end
if a==10 then
turtle.turnLeft()
turtle.select(2)
turtle.place()
turtle.turnLeft()
turtle.turnLeft()
turtle.place()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
turtle.turnLeft()
turtle.select(3)
turtle.place
turtle.turnLeft()
turtle.turnLeft()
print("laying powerrail")
a=0
i=i+1
end
and yeah. I'm totally new at this. Made my first script earlier today
Edited by