Passing parameters to a script

Lambdas and scripts are two different things.

A Script is a piece of code that lives in the scripts folder. One cannot pass arguments to a Script nor can one get a return value from a Script. I frankly find them not particularly useful.

Lambdas, on the other hand, are a variable. Lambdas must be defined in a .rules file and only rules that reside in the same file as the lambda can call the lambda.

You cannot call a lambda defined in a .script file from a .rules file.

Notice how @ptweety’s example is all in the same “file” as presented. That is not by accident.

Of course, if you wanted to pass arguments to a .script file, @ptweety’s second example would be the way to do it.

I personally prefer this approach: