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/H...vancedorefinder
[Lua][Error] attempt to call number
Started by Henness, Dec 17 2012 09:32 PM
11 replies to this topic
#1
Posted 17 December 2012 - 09:32 PM
#2
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).
#3
Posted 17 December 2012 - 09:55 PM
Thanks
#4
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
#5
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/H...vancedorefinder
Thanks for all the help
I'm getting attempt to compare string with number expected, got string on line 336
https://github.com/H...vancedorefinder
Thanks for all the help
#6
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)
#7
Posted 17 December 2012 - 10:48 PM
line 435
#8
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.
#9
Posted 17 December 2012 - 11:00 PM
thanks I added some tonumber() to the tArgs
#10
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
https://github.com/H...vancedorefinder
#11
Posted 18 December 2012 - 12:17 AM
Bump
#12
Posted 18 December 2012 - 12:52 AM
Henness, on 17 December 2012 - 11:33 PM, said:
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
https://github.com/H...vancedorefinder
I finally got it there was a variable that was local that shouldn't have been.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











