Throw a nicer error message if the user tries to use cl_lua without it being initialized
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user