lua-users home
lua-l archive

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


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)