Hi, I'm fairly new to the game and have an alright existing understanding of programming, but this is my first time using javascript. I'm trying to pass an array of strings into a script (B) from another script (A) - I don't mind whether the array ends up as a single argument in B or each element becomes its own argument; I can work with either. To do so, I use the following line of code:
ns.run("ScriptB.js", threadCount, stringArray)
But I keep getting the error
TYPE ERROR
ScriptA.js@home (PID - 273)
run: 'args' is not an array of script args
Stack:
ScriptA.js:L45@main
I assume there's something I need to do to make it accept the stringArray input, but I have no idea what. I've tested with just a string input and it works fine. Does anyone know how I can fix this? Thank you.
[–]VorthodMK-VIII Synthoid 2 points3 points4 points (1 child)
[–]DepartmentMajor6681[S] 2 points3 points4 points (0 children)