Throw a nicer error message if the user tries to use cl_lua without it being initialized

This commit is contained in:
EvilFactory
2023-06-10 20:36:29 -03:00
parent b606cc770f
commit 3bc8f06e58

View File

@@ -3389,6 +3389,12 @@ namespace Barotrauma
return;
}
if (GameMain.LuaCs.Lua == null)
{
ThrowError("LuaCs not initialized, use the console command cl_reloadluacs to force initialization.");
return;
}
try
{
GameMain.LuaCs.Lua.DoString(string.Join(" ", args));