tweaked script node

This commit is contained in:
John Andrews
2022-05-31 18:28:08 +12:00
parent 0c84679240
commit 51bc02bd01
24 changed files with 33 additions and 2 deletions

View File

@@ -45,7 +45,8 @@ public class ScriptNode:Node
var execArgs = new JavascriptExecutionArgs
{
Args = args,
Code = Code + "\n\n" + entryPoint
//Code = ("try\n{\n\t" + Code.Replace("\n", "\n\t") + "\n\n\t" + entryPoint + "\n} catch (err) { \n\tLogger.ELog(`Error in script [${err.line}]: ${err}`);\n\treturn -1;\n}").Replace("\t", " ")
Code = (Code + "\n\n" + entryPoint).Replace("\t", " ").Trim()
};
if (script.Parameters?.Any() == true)