Passing a parameter from a script to another script

If I’m getting it right, you are trying to build a code in which you insert the parameters as local variables and their
value as literals. There are lots of things that can go wrong there. And is not exactly parameter passing.

Let’s have the test script:

/log info "argByName:$argByName";
/log info "arg 0:$0";
/log info "arg 1:$1";

and the runtest script:

# get the script source
:local s [/system script get test source]

# make a local function from it:
:local c [:parse $s]

# run it supplying the arguments
$c argByName="Arg1" 1

For “purely academic” interest, have a look at this posting: http://forum.mikrotik.com/t/a-few-undocumented-operators-that-are-kind-of-neat/163557/1 especially the <%% operator.
It solves the problem with “overkill”, passing arguments by reference!