189 posts
Posted 17 December 2012 - 09:32 PM
I'm close to finishing my program but I can't figure out this last bug
attempt to call number on line 311
https://github.com/Henness0666/Advanced-Programs/blob/master/advancedorefinder
7508 posts
Location
Australia
Posted 17 December 2012 - 09:46 PM
this is your naming conflict. you have a variable called face, and a function called face, it thinks you are trying to call the variable because of how lua does function pointers. I suggest that you try find/replace face( with something like setFace( (or whatever that function does, make you function names descriptive, coding standards say a function name should be a verb followed by a 1-3 word description of what it does).
189 posts
Posted 17 December 2012 - 09:55 PM
Thanks
1548 posts
Location
That dark shadow under your bed...
Posted 17 December 2012 - 10:20 PM
well either that or a table storing the face value and a metatable so you can call it too. I like doing that as it keeps your variables organised
189 posts
Posted 17 December 2012 - 10:34 PM
I hate tables :(/>
I'm getting attempt to compare string with number expected, got string on line 336
https://github.com/Henness0666/Advanced-Programs/blob/master/advancedorefinderThanks for all the help
7508 posts
Location
Australia
Posted 17 December 2012 - 10:46 PM
where is ofSave["l"] initialised? and is it actually a number being saved? (had a quick look and i could only see it being used)
189 posts
Posted 17 December 2012 - 10:48 PM
line 435
2005 posts
Posted 17 December 2012 - 10:55 PM
You pass in tArgs[2] and make it length and then use it in runOreFinder() without changing it to number, so it's a string.
189 posts
Posted 17 December 2012 - 11:00 PM
thanks I added some tonumber() to the tArgs
189 posts
Posted 17 December 2012 - 11:33 PM
New problem and its not a error this time I'm getting closer. My problem is that the program is just ignoring my width and length variables. It just continues on and on in a strait line. And I have no Idea why it doesn't make sense.
https://github.com/H...vancedorefinder
189 posts
Posted 18 December 2012 - 12:17 AM
Bump
189 posts
Posted 18 December 2012 - 12:52 AM
New problem and its not a error this time I'm getting closer. My problem is that the program is just ignoring my width and length variables. It just continues on and on in a strait line. And I have no Idea why it doesn't make sense.
https://github.com/H...vancedorefinder
I finally got it there was a variable that was local that shouldn't have been.