Sorry for the simple question, but I am at work and have no way to test for the answer.
When turtle.dig() is successful, but the block cannot be picked up, does it return true or false?
The documentation is unclear.
4 replies to this topic
#1
Posted 15 October 2012 - 05:34 PM
#2
Posted 15 October 2012 - 05:36 PM
It returns true if a block broke, regardless of drops.
#4
Posted 14 January 2013 - 06:30 AM
I've tried that in coding for turtles when they hit bedrock to come back, but I kept getting the "attempt to call a nil" error. I assumed after numerous failures that "if turtle.dig() == true" doesn't work. Should I true "if turtle.dig(true)" or something along those lines instead? I'm not sure that would work either. Anyway, the documentation I've read states the bool return is "success", not "true".
Any help would be appreciated.
Any help would be appreciated.
#5
Posted 14 January 2013 - 11:54 AM
Ditto8353, on 15 October 2012 - 05:34 PM, said:
Sorry for the simple question, but I am at work and have no way to test for the answer.
When turtle.dig() is successful, but the block cannot be picked up, does it return true or false?
The documentation is unclear.
When turtle.dig() is successful, but the block cannot be picked up, does it return true or false?
The documentation is unclear.
GopherAtl, on 15 October 2012 - 05:36 PM, said:
It returns true if a block broke, regardless of drops.
Wutdaflux, on 14 January 2013 - 06:30 AM, said:
I've tried that in coding for turtles when they hit bedrock to come back, but I kept getting the "attempt to call a nil" error. I assumed after numerous failures that "if turtle.dig() == true" doesn't work. Should I true "if turtle.dig(true)" or something along those lines instead? I'm not sure that would work either. Anyway, the documentation I've read states the bool return is "success", not "true".
Any help would be appreciated.
Any help would be appreciated.
But a quick answer...
if turtle.dig() thenshould work, its the same as doing
if turtle.dig() == true thenif it doesn't work then chances are its another problem, like trying to run a turtle program on a computer ( the computer can move, so it doesn't know about the turtle api, it sees any turtle function as nil )
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











