Posted 13 September 2014 - 11:59 AM
Hey guys,
I've been recently working on a automatic Treefarm on my FTB Unleashed server.
Since me and some other friends need more wood, I started programming this.
For some reason, when I start the Program, the turtle doesn't move, also it doesn't give me an error message.
Heres The Code
Sorry if it's mixed with German, but here I explain the functions:
Initialisierung() == Gets stuff out of the chest which is at the right of the turtle
Place(30) == selects saplings in slot 1 and places one, then sleeps 30 seconds
Check() == Selects wood in slot 2 and checks, if there is wood in front of the turtle. If yes, it starts the function Abbau()
Abbau() == Right now it just should make the turtle turn left and right again, so I can see if it has made it to the Abbau() function.
When I start the program though, the turtle doesn't move in the beginning, doesn't get stuff out of the chest, doesn't even throw an error.
What is going on?
Btw I'm a ComputerCraft beginner :P/>
Also a stupid question, how do I make spoilers?
Hope you guys can help me.
I've been recently working on a automatic Treefarm on my FTB Unleashed server.
Since me and some other friends need more wood, I started programming this.
For some reason, when I start the Program, the turtle doesn't move, also it doesn't give me an error message.
Heres The Code
while true do
function Check()
turtle.select(2)
if compare() == true then
Abbau()
else
end
function Abbau()
turtle.turnRight()
turtle.turnLeft()
end
function Place(int)
turtle.place()
sleep(int)
end
function Initialisierung()
turtle.select(1)
turtle.turnRight()
turtle.suck()
turtle.select(2)
turtle.suck()
turtle.turnLeft()
turtle.select(1)
end
Initialisierung()
Place(30)
Check()
Abbau()
end
end
Sorry if it's mixed with German, but here I explain the functions:
Initialisierung() == Gets stuff out of the chest which is at the right of the turtle
Place(30) == selects saplings in slot 1 and places one, then sleeps 30 seconds
Check() == Selects wood in slot 2 and checks, if there is wood in front of the turtle. If yes, it starts the function Abbau()
Abbau() == Right now it just should make the turtle turn left and right again, so I can see if it has made it to the Abbau() function.
When I start the program though, the turtle doesn't move in the beginning, doesn't get stuff out of the chest, doesn't even throw an error.
What is going on?
Btw I'm a ComputerCraft beginner :P/>
Also a stupid question, how do I make spoilers?
Hope you guys can help me.