Debugging "attempt to call a table value"

Hi,

I’m getting this error reported frequently enough for it to be a worry (through my game analytics)

“?:-1: attempt to call a table value stack traceback:”

Looks like I’m passing a table instead of a value somewhere, but where? Any idea of how I could go about debugging this?

Thanks,

Nathan.

Actually as it seems from the error you are passing a value where you should be passing a function. Maybe a call back function?

Hmmm - not sure how that could happen. I’ll have a sniff around.

There are a stack of errors I’m getting like there where there is no line or function reference (see one below). Any idea how I can get more detail?

&nbsp;?:0: attempt to index field '?' (a nil value) stack traceback: [C]: ? ?: in function \<?:1778\> ?: in function \<?:218\> &nbsp;

No function name in stack trace means that the error occured in a compiled library not in your source.

As to why I can only speculate but it could be a simple problem in your code passing something wrong to the library.

Actually as it seems from the error you are passing a value where you should be passing a function. Maybe a call back function?

Hmmm - not sure how that could happen. I’ll have a sniff around.

There are a stack of errors I’m getting like there where there is no line or function reference (see one below). Any idea how I can get more detail?

&nbsp;?:0: attempt to index field '?' (a nil value) stack traceback: [C]: ? ?: in function \<?:1778\> ?: in function \<?:218\> &nbsp;

No function name in stack trace means that the error occured in a compiled library not in your source.

As to why I can only speculate but it could be a simple problem in your code passing something wrong to the library.