Posted 27 December 2012 - 02:32 PM
I'm working on a program that will mine in a pinwheel pattern, while gathering all of the ores it finds. It always errs on the first call that I make to one of my own functions. I get "Pinwheel :28: attempt to call nil".
I have tried moving my calls such that they come after the function they call is read, but with the current structure of my code it is not possible to do that for the entire program.
I have also tried relegating 4 lines under "–Here be the main" to a Main() function, and then calling that function only at the very end, but had no luck there either.
http://pastebin.com/5wprJJjh
Thank you for your time!
*edit for clarity
** Edit 2: Got it past the compiler by removing "local" from all of my functions and moving he 4 lines under "–Here be the main" to the end of the program. I'm still experiencing all sorts of oddness, but I'm troubleshooting that. Still, any inputs on the code would be appreciated!
I have tried moving my calls such that they come after the function they call is read, but with the current structure of my code it is not possible to do that for the entire program.
I have also tried relegating 4 lines under "–Here be the main" to a Main() function, and then calling that function only at the very end, but had no luck there either.
http://pastebin.com/5wprJJjh
Thank you for your time!
*edit for clarity
** Edit 2: Got it past the compiler by removing "local" from all of my functions and moving he 4 lines under "–Here be the main" to the end of the program. I'm still experiencing all sorts of oddness, but I'm troubleshooting that. Still, any inputs on the code would be appreciated!