lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Luiz Henrique de Figueiredo wrote:
I'm doing luaL_loadbuffer() and I do get errors, but no line numbers.


That's strange: in case of errors, luaL_loadbuffer() leaves an error message
on the stack and this message contains the filename and the line number.

Actually, it turns out there was a more interesting problem. I was running on Mac OS, where the line endings are simply carriage returns. That doesn't seem to bother Lua itself, but I guess the line counting algorithm is looking for UNIX-style line endings. So in my case the line number was usually something like 1.