public void RunFolder(string folder) { foreach (var str in DirSearch(folder)) { var s = str.Replace("\\", "/"); if (s.EndsWith(".lua")) { lua.PrintMessage(s); try { lua.DoFile(s); } catch (Exception e) { lua.HandleLuaException(e); } } } }
public DynValue Call(string name, DynValue[] args) { foreach (HookFunction hf in hookFunctions) { if (hf.name == name) { try { var result = env.lua.Call(hf.function, args); if (result.IsNil() == false) { return(result); } } catch (Exception e) { env.HandleLuaException(e); } } } return(null); }