Jump to content




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


  • You cannot reply to this topic
1 reply to this topic

#1 Doyle3694

  • Members
  • 815 posts

Posted 13 April 2014 - 01: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 by Doyle3694, 13 April 2014 - 02:02 PM.


#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 13 April 2014 - 02: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.)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users