Passing parameters to a script

I think, your Lambda is not in the correct syntax. You may want to look into this:

https://community.openhab.org/t/reusable-functions-a-simple-lambda-example-with-copious-notes/15888