Пример #1
0
        public void ProcessFile(string fileName)
        {
            LuaError ret;

            ret = (LuaError)CApi.luaL_loadfilex(lua_State, fileName, null);
            if (ret != LuaError.OK)
            {
                ErrorCodeToException(ret);
            }

            ret = (LuaError)CApi.lua_pcallk(lua_State, 0, LUA_MULTIRET, 0, IntPtr.Zero, IntPtr.Zero);
            if (ret != LuaError.OK)
            {
                ErrorCodeToException(ret);
            }
        }