[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Annoying inconsistency in error formats
- From: Sean Conner <sean@...>
- Date: Tue, 27 May 2014 12:24:50 -0400
It was thus said that the Great Luiz Henrique de Figueiredo once stated:
> > luaL_loadstring(L, str, "ScriptPane")
> >
> > ERROR:String-ScriptPane:1: ...
>
> There something worng here because luaL_loadstring takes only two arguments.
>
> If you use
> luaL_loadbuffer(L,str,strlen(str),"ScriptPane");
> you'll get the same error message as with load in Lua:
> [string "ScriptPane"]:1: ...
>
> Note that you can control the name of the chunk by adding "=" in the front:
> luaL_loadbuffer(L,str,strlen(str),"=ScriptPane");
> which gives
> ScriptPane:1: ...
I can't find anything in the documentation about this, in either Lua 5.1
or 5.2.
-spc (Not saying it's not there, just that I can't find it)