Posted 03 September 2014 - 05:49 AM
Being extremely new to programming Ive been having trouble with a program for a mining turtle. I keep getting "turtle: 22: Expected number" but line 22 is the start of a new function. My lua editor says the syntax is valid. The program in question is supposed to mine a layer determined by user input length and width then decend 3 layers before repeating. As is mines it scans the ore above and below and compares if it is similiar to the trash slots 1-3. If its not then it mines. After every pass it empties any trash thats compared to slots 1-3. After every second pass it checks if slot 14 is occupied. If so it then returns the ore to a chest nest to the starting point.
Ive checked multiple sites as well as a lua editor that can debug and check syntax. So far nothing has helped. This is my third re-write with alterations so Im at my whits end.
Any help would be greatly appreciated be it a solution to the error or general adivce to help me improve my programming.
The program can be viewed at "http://pastebin.com/tFRpugwy".
Thanks in advance!
Ive checked multiple sites as well as a lua editor that can debug and check syntax. So far nothing has helped. This is my third re-write with alterations so Im at my whits end.
Any help would be greatly appreciated be it a solution to the error or general adivce to help me improve my programming.
The program can be viewed at "http://pastebin.com/tFRpugwy".
Thanks in advance!
Edited on 03 September 2014 - 06:06 AM