示例#1
0
文件: Lua.cs 项目: yarligayan/libTech
        public static LuaFuncRef Compile(string Str)
        {
            if (LL.luaL_loadstring(L, Str) != 0)
            {
                throw new Exception(LL.lua_tostring(L, -1));
            }

            return(new LuaFuncRef(L));
        }
示例#2
0
文件: Lua.cs 项目: yarligayan/libTech
        static void Run(LuaFuncRef FuncRef, int ReturnValues, object[] Args)
        {
            FuncRef.GetRef();

            for (int i = 0; i < Args.Length; i++)
            {
                Advanced.Push(L, Args[i]);
            }

            if (LL.lua_pcall(L, Args.Length, ReturnValues, 0) != 0)
            {
                throw new Exception(LL.lua_tostring(L, -1));
            }
        }