Re: compile-time error line numbers
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: compile-time error line numbers
 
- From: Will Leshner <leshner@...>
 
- Date: 2004年5月17日 13:00:09 -0700
 
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.