[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Annoying inconsistency in error formats
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 27 May 2014 09:42:17 -0300
> 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: ...