This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Doyle3694's profile picture

[1.62][SSP]turtle.craft() removed

Started by Doyle3694, 13 April 2014 - 12:58 PM
Doyle3694 #1
Posted 13 April 2014 - 02:58 PM
After using turtle.craft() A LOT of times(I have a turtle picking up water and crafting it into fresh water) I encountered that the command turtle.craft() completely removes itself, to the point that the only way of getting it back is by restarting the game. Restarting the turtle does not work. Possible causes for this is either it crafting alot of times or the fact that I went to the nether while it was going so it might have gotten unloaded while turtle.craft()ing.

Code:

while true do
  turtle.select(1)
  turtle.placeDown()
  turtle.craft()
  turtle.select(2)
  while not turtle.drop() do end
end

EDIT: What I mean by it removing itself is that it returns "attempt to call nil"
Edited on 13 April 2014 - 01:02 PM
Bomb Bloke #2
Posted 13 April 2014 - 03:28 PM
Besides restarting the game and rebooting the turtle, have you also tried pickaxing the turtle and replacing it, or using the new turtle.equipLeft / turtle.equipRight commands on it? I'm guessing the addition of those latter two have something to do with it, as their introduction came with the possibility of removing the craft command from a given turtle.

I'd also be interested to know what happens if you copy the function pointer into a global variable, then check the contents of that when the issue strikes.

(For those wondering what happens if you do that then remove the crafting table from a turtle, the function pointer remains, but does nothing when you call it.)