Closed ghost closed 3 years ago
NeoLua Version:1.3.13
Example to reproduce:
public static Lua lua = new Lua(); public static LuaGlobal luaCE = lua.CreateEnvironment(); public static Dictionary<string, List<LuaChunk>> luaFuncs = new Dictionary<string, List<LuaChunk>>(); public static bool CallLuaFunc<T>(string key, T data) { bool flag = true; if (luaFuncs.ContainsKey(key)) { foreach (LuaChunk luaFunction in luaFuncs[key]) { try { if (!Convert.ToBoolean(luaCE.DoChunk(~~data~~)[0] ?? true)) { flag = false; } } catch (Exception ex) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine($"[ERROR] - {ex.Data}\n - Message:{ex.Message}"); Console.ForegroundColor = ConsoleColor.White; return false; } } } return flag; }
Your example runs precompiled lua code. And it looks good so far. What is the problem?
NeoLua Version:1.3.13
Example to reproduce: