예제 #1
0
        /// <summary>
        /// looks in the lua stack top if theres a string on top
        /// if it is a string then it adds it as an error message to the Errors list
        /// Clears the method off the stack by setting the top to 0
        /// </summary>
        public void LogError()
        {
            //log error
            if (Lua.lua_isstring(L, -1) > 0)
            {
                Errors.Add(Lua.lua_tostring(L, -1));
            }

            //clear the stack
            Lua.lua_settop(L, 0);
        }