LuaInterface.LuaDLL.luaL_dostring C# (CSharp) Method

luaL_dostring() public static method

public static luaL_dostring ( IntPtr luaState, string chunk ) : int
luaState System.IntPtr
chunk string
return int
        public static int luaL_dostring(IntPtr luaState, string chunk)
        {
            int result = LuaDLL.luaL_loadstring(luaState, chunk);
            if (result != 0)
                return result;

            return LuaDLL.lua_pcall(luaState, 0, -1, 0);
        }
        public static int lua_dostring(IntPtr luaState, string chunk)

Usage Example

 private void createIndexingMetaFunction(IntPtr luaState)
 {
     LuaDLL.lua_pushstring(luaState, "luaNet_indexfunction");
     LuaDLL.luaL_dostring(luaState, MetaFunctions.luaIndexFunction);
     LuaDLL.lua_rawset(luaState, LuaIndexes.LUA_REGISTRYINDEX);
 }
All Usage Examples Of LuaInterface.LuaDLL::luaL_dostring
LuaDLL