Let's say I want it to check if there is redstone in front of it.
I got a turtle with 1 Redstone in slot 1.
The program I made looks like this:
if turtle.compare(1) == true then
print("There is redstone in front of me!")
else
print("There is no redstone!")
end
It would always tell me "There is no redstone!" no matter what I place in front of it.
So I tried it with compareTo
if turtle.compareTo(1) == true then
print("There is redstone in front of me!")
else
print("There is no redstone!")
end
This one would always say there is redstone in front of him even if there is no block at all.
What am I doing wrong?












