示例#1
0
        /// <summary>
        /// Runs a lua script and returns true on success
        /// </summary>
        /// <param name="script">the string containing the script to run</param>
        /// <returns>returns teu if successfull otherwise false</returns>
        public bool RunLuaScript(string script)
        {
            if (L == IntPtr.Zero)
            {
                return(false);
            }

            if (Lua.luaL_dostring(L, script) == 0)
            {
                return(true);
            }

            //log the error if possible
            LogError();
            return(false);
        }