# Ignition 8.0.12 - RunScript with string arg

**URL:** <https://forum.inductiveautomation.com/t/ignition-8-0-12-runscript-with-string-arg/37979>\
**Category:** Ignition\
**Created:** [August 21, 2020, 4:54pm UTC](https://forum.inductiveautomation.com/t/ignition-8-0-12-runscript-with-string-arg/37979 "2020-08-21T16:54:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vrautomation](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/vrautomation/32/11155_2.png) [@vrautomation](https://forum.inductiveautomation.com/u/vrautomation)\
**Post date:** [August 21, 2020, 4:54pm UTC](https://forum.inductiveautomation.com/t/ignition-8-0-12-runscript-with-string-arg/37979/1 "2020-08-21T16:54:55Z")

</div>

I have a simple script used to ping a device:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/1/11da7a3b9b0905f6ad16455e3c62ba7647067a35.png)

I’m calling the script from an expression tag:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/f/0f75d775364f0ef9f044d5851d42016b3e1eb5d6.png)

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?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 21, 2020, 5:08pm UTC](https://forum.inductiveautomation.com/t/ignition-8-0-12-runscript-with-string-arg/37979/2 "2020-08-21T17:08:13Z")

</div>

`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.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 21, 2020, 5:08pm UTC](https://forum.inductiveautomation.com/t/ignition-8-0-12-runscript-with-string-arg/37979/3 "2020-08-21T17:08:21Z")

</div>

Remove the parens from your function reference in the runScript call. I don’t know why our documentation is wrong.

---

<div class="post-metadata">

**Author:** ![Paul.Scott](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.scott/32/4578_2.png) [@Paul.Scott](https://forum.inductiveautomation.com/u/Paul.Scott)\
**Post date:** [August 21, 2020, 5:19pm UTC](https://forum.inductiveautomation.com/t/ignition-8-0-12-runscript-with-string-arg/37979/4 "2020-08-21T17:19:04Z")

</div>

> [@Kevin.Herron](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![vrautomation](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/vrautomation/32/11155_2.png) [@vrautomation](https://forum.inductiveautomation.com/u/vrautomation)\
**Post date:** [August 21, 2020, 5:31pm UTC](https://forum.inductiveautomation.com/t/ignition-8-0-12-runscript-with-string-arg/37979/5 "2020-08-21T17:31:24Z")

</div>

Problem solved. Thanks!
