Posted 04 December 2014 - 05:41 AM
First, here's the pastebin: http://pastebin.com/jjHTa85Z
The pertinent details:
Fairly straightforward program. Turtle checks to see if a log is in front of him. If so, he starts chopping, comes back down and tries to replant a sapling from his inventory. However, when he cycles through his inventory slots in the replantSapling function, he breaks once he hits an empty slot. If I have anything in slot 1, everything runs smoothly, but once I get to an empty slot I get an error saying it's trying to index ? (a nil value). I have a feeling that I am missing something fairly basic but I can't seem to nail it down. Any ideas team?
The pertinent details:
Fairly straightforward program. Turtle checks to see if a log is in front of him. If so, he starts chopping, comes back down and tries to replant a sapling from his inventory. However, when he cycles through his inventory slots in the replantSapling function, he breaks once he hits an empty slot. If I have anything in slot 1, everything runs smoothly, but once I get to an empty slot I get an error saying it's trying to index ? (a nil value). I have a feeling that I am missing something fairly basic but I can't seem to nail it down. Any ideas team?