fixed empty functions causing errors
This commit is contained in:
@@ -422,6 +422,7 @@ namespace Barotrauma
|
|||||||
var cmd = new DebugConsole.Command(name, help, (string[] arg1) => { env.CallFunction(onExecute, new object[] { arg1 }); },
|
var cmd = new DebugConsole.Command(name, help, (string[] arg1) => { env.CallFunction(onExecute, new object[] { arg1 }); },
|
||||||
() =>
|
() =>
|
||||||
{
|
{
|
||||||
|
if (getValidArgs == null) return null;
|
||||||
var result = env.CallFunction(getValidArgs, new object[] { });
|
var result = env.CallFunction(getValidArgs, new object[] { });
|
||||||
if (result == null || !(result is string[][])) { return null; }
|
if (result == null || !(result is string[][])) { return null; }
|
||||||
return (string[][])result;
|
return (string[][])result;
|
||||||
|
|||||||
Reference in New Issue
Block a user