# Sytax Error

**URL:** <https://forum.inductiveautomation.com/t/sytax-error/6383>\
**Category:** General Discussion\
**Created:** [May 3, 2013, 10:17pm UTC](https://forum.inductiveautomation.com/t/sytax-error/6383 "2013-05-03T22:17:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Garcov](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@Garcov](https://forum.inductiveautomation.com/u/Garcov)\
**Post date:** [May 3, 2013, 10:17pm UTC](https://forum.inductiveautomation.com/t/sytax-error/6383/1 "2013-05-03T22:17:34Z")

</div>

I can not find this error could someone please help

if(tag({Root Container.running})=1,1,  
if(tag({Root Container.breaker})=0,3,  
if(tag({Root Container.overload})=0&&(tag({Root Container.breaker})=1,2,0))))

Syntax Error on Token: ‘Comma’(line3, Char70)

---

<div class="post-metadata">

**Author:** ![CPowell](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@CPowell](https://forum.inductiveautomation.com/u/CPowell)\
**Post date:** [May 3, 2013, 11:23pm UTC](https://forum.inductiveautomation.com/t/sytax-error/6383/2 "2013-05-03T23:23:10Z")

</div>

You added a extra ‘(’ on line 3 before second tag and lose 1 ‘)’ at the end.

Code should look something like…

```auto
if(tag({Root Container.running})=1,1,
if(tag({Root Container.breaker})=0,3,
if(tag({Root Container.overload})=0&&tag({Root Container.breaker})=1,2,0)))
```

Another way to handle this would be to use binEnc().  
Removes all the layers of if statements and would give you more flexibility to change color, text, etc…

```auto
binEnc(tag({Root Container.running}),tag({Root Container.breaker}),tag({Root Container.overload}))
```

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![Garcov](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@Garcov](https://forum.inductiveautomation.com/u/Garcov)\
**Post date:** [May 4, 2013, 1:38am UTC](https://forum.inductiveautomation.com/t/sytax-error/6383/3 "2013-05-04T01:38:14Z")

</div>

Thanks I figured it out.
