cue wrote:I'm afraid I don't understand what exactly is your problem, but as far as I know sq_stackinfos() is the only way to trace down runtime errors (apart from a squirrel debugger of course). Unfortunately I also found that the line number returned in si.line actually references the line after the line that caused the error.
yes, and it seems, si.line icrements in the last statement, before the native closure (if that's the statement) is called.
so with squirrel lines that have multiple statements, always reporting si.line - 1 is wrong except for the last statement.