# Error writting to tagxxx Bad; unspecified

**URL:** <https://forum.inductiveautomation.com/t/error-writting-to-tagxxx-bad-unspecified/23246>\
**Category:** Ignition\
**Created:** [March 12, 2019, 2:47pm UTC](https://forum.inductiveautomation.com/t/error-writting-to-tagxxx-bad-unspecified/23246 "2019-03-12T14:47:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bchristenson](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@bchristenson](https://forum.inductiveautomation.com/u/bchristenson)\
**Post date:** [March 12, 2019, 2:47pm UTC](https://forum.inductiveautomation.com/t/error-writting-to-tagxxx-bad-unspecified/23246/1 "2019-03-12T14:47:20Z")

</div>

Hi,

I’m trying to clear the value of an OPC tag by pushing a button in ignition. the value of the tag is displayed in a label. I can set the label to 0 but the value of the tag doesn’t change with it. when i go to the scripting under set tag value of my tag to 0 i get the following error message: Error writing to tag P525/FaultCodes1 Bad; unspecified.  
any idea why this is happening and how i can solve this?

 ![FaultCode](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/149bade0c5438b023708342579b989601f98fc4d.png)

---

<div class="post-metadata">

**Author:** ![bpreston](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@bpreston](https://forum.inductiveautomation.com/u/bpreston)\
**Post date:** [March 12, 2019, 3:20pm UTC](https://forum.inductiveautomation.com/t/error-writting-to-tagxxx-bad-unspecified/23246/2 "2019-03-12T15:20:34Z")

</div>

Can you show your script? Can’t be sure without seeing it. Are you using [system.tag.write()](https://docs.inductiveautomation.com/display/DOC79/system.tag.write) to set your value to 0 in the tag?

---

<div class="post-metadata">

**Author:** ![bchristenson](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@bchristenson](https://forum.inductiveautomation.com/u/bchristenson)\
**Post date:** [March 12, 2019, 3:49pm UTC](https://forum.inductiveautomation.com/t/error-writting-to-tagxxx-bad-unspecified/23246/3 "2019-03-12T15:49:33Z")

</div>

![FaultCodeScript](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/8cfd63716d4a4cfdc781a82e79cd4f9f6af3e846.png) this is how i have it now to set my label to 0.

 ![FaultCodeScriptError](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/6aed30a6058b71a4d5949c3651d992ea3a3cf461.png) Doing it this way is how i get the error message.

---

<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:** [March 12, 2019, 3:50pm UTC](https://forum.inductiveautomation.com/t/error-writting-to-tagxxx-bad-unspecified/23246/4 "2019-03-12T15:50:14Z")

</div>

Is that tag write-protected in the PLC?
