I have a simple script used to ping a device:

I’m calling the script from an expression tag:

The problem is the runScript does not send the arguments. Only the defaut value is used.
If I remove the default value, the tag goes in error (config error)
If I pass an invalid IP address in the runScript call, the default value is used.
What am I missing?
runScript("IP_Monitor.checkPing", 0, "10.161.5.5")
If you’re using the ‘newer’ form of runScript
where you pass arguments separately, the first argument should just be a reference to the function to call itself. The ‘legacy’ syntax was to embed your parameters directly in the first argument, which is unwieldy.
1 Like
Remove the parens from your function reference in the runScript call. I don’t know why our documentation is wrong.
It’s not anymore 
@vrautomation I apologize for any confusion the examples in the docs played here.