fix formatting in lua require and better error handling with dofile,loadfile,etc

This commit is contained in:
Evil Factory
2022-05-04 08:50:17 -03:00
parent 7a6ddccbb7
commit bbea195e7d
6 changed files with 148 additions and 169 deletions

View File

@@ -3224,7 +3224,14 @@ namespace Barotrauma
return;
}
GameMain.LuaCs.Lua.DoString(string.Join(" ", args));
try
{
GameMain.LuaCs.Lua.DoString(string.Join(" ", args));
}
catch(Exception ex)
{
GameMain.LuaCs.HandleException(ex);
}
}));
commands.Add(new Command("cl_cs", "cs_cl: runs a string on the client", (string[] args) =>
{