r/ComputerCraft • u/Defragmented-Defect • Jan 23 '21
Possible glitch? Explanation in comments
6
u/itchyDoggy Jan 23 '21
If you take a look at the example code on the wiki here you can see that it returns a tuple with the first one being a boolean and the second one being the table that you want.
5
u/Defragmented-Defect Jan 23 '21
Ohhhhh, so it writes to two separate variables! I didn't realize that from the documentation, thanks
4
u/itchyDoggy Jan 23 '21
No problem, I didn't understand it after looking at the description of the function either, but the example code made it clear to me.
2
u/InsideBSI Jan 24 '21
If only minecraft had a screenshot feature
2
u/Defragmented-Defect Jan 24 '21
Oh, it does, but for some reason my client keeps crashing when I use it, I'm working on it
2
5
u/Defragmented-Defect Jan 23 '21
I'm trying to run this short peice of code as a test to get the exact output for detecting an oak log for a tree feller turtle, but whenever the (table).name is called for any reason the program crashes. In this instance, I'm trying to print data.name, but my other turtle crashes when I attempt to use data.name in an IF statement
Edit: forgot to mention, this happens regardless of what if any blocks are in front of the turtle