# Gateway event script 2

**URL:** <https://forum.inductiveautomation.com/t/gateway-event-script-2/50509>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [September 1, 2021, 12:17pm UTC](https://forum.inductiveautomation.com/t/gateway-event-script-2/50509 "2021-09-01T12:17:43Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 1, 2021, 1:49pm UTC](https://forum.inductiveautomation.com/t/gateway-event-script-2/50509/5 "2021-09-01T13:49:15Z")

</div>

> [@bkarabinchak.psi](#):
>
> Also, I believe system.tag.writeBlocking requires lists even for singular values so it should be `system.tag.writeBlock(['myTag'], ['true'])`

Actually, depending on the version, single elements passed as strings will work.

> [@Attribute Error in Component Custom Method](https://forum.inductiveautomation.com/t/attribute-error-in-component-custom-method/47712/15):
>
> Fairly recently we made a sneaky change to the read and write functions to allow single elements to be passed, since it's a common 'papercut' issue for new users and our training department. The preferred syntax is still to call it with a list, but single values are accepted - that explains the syntax in the OP working. Basically correct - gateway event scripts are the only system that still uses 'legacy' scripting, and therefore needs you to reimport system inside any defined functions.

---

_[View the full topic](https://forum.inductiveautomation.com/t/gateway-event-script-2/50509)._
