Posted 16 December 2012 - 07:08 AM
Hello,
I wrote a programm for a turtle to chop down a redwood tree. The problem is: It has an error if it reach a line with a "="…
It say something like that:"XXXXXXX :4: "=" probably". It did it by the line "x=x+0" by the line "x=x+1" and also the line "for i=1,x do " didn't work…
I tried to rewrite it without "=", but the result was that:
It chops 2blocks at the bottom and then print the message:
"chop:4: attemps to perform arithmetic
__add on nill and number"
It have no idea what that could mean….
If you wish, I can set the code to the first one and write the error-message with the "=" here exactly.
I hope someone can help me, please qick - I need the charcoal for my quarry ;D
(I don't understand how to craft solar panels…)
Thank you at least for reading since here! ;D
I wrote a programm for a turtle to chop down a redwood tree. The problem is: It has an error if it reach a line with a "="…
It say something like that:"XXXXXXX :4: "=" probably". It did it by the line "x=x+0" by the line "x=x+1" and also the line "for i=1,x do " didn't work…
I tried to rewrite it without "=", but the result was that:
turtle.dig()
turtle.forward()
turtle.dig()
while turtle.detectUp() do
turtle.digUp()
turtle.Up()
turtle.dig()
x = x+1
end
turtle.turnRight()
turtle.dig()
turtle.forward
turtle.turnLeft()
turtle.dig()
while i < x do
i = i+1
turtle.digDown()
turtle.down()
turtle.dig()
end
It chops 2blocks at the bottom and then print the message:
"chop:4: attemps to perform arithmetic
__add on nill and number"
It have no idea what that could mean….
If you wish, I can set the code to the first one and write the error-message with the "=" here exactly.
I hope someone can help me, please qick - I need the charcoal for my quarry ;D
(I don't understand how to craft solar panels…)
Thank you at least for reading since here! ;D