lua-users home
lua-l archive

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


> 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: ...