# \[BUG\] If Statement

**URL:** <https://forum.inductiveautomation.com/t/bug-if-statement/32410>\
**Category:** Ignition\
**Tags:** ignition80, scripting\
**Created:** [February 19, 2020, 8:42am UTC](https://forum.inductiveautomation.com/t/bug-if-statement/32410 "2020-02-19T08:42:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joostjojo](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@joostjojo](https://forum.inductiveautomation.com/u/joostjojo)\
**Post date:** [February 19, 2020, 8:42am UTC](https://forum.inductiveautomation.com/t/bug-if-statement/32410/1 "2020-02-19T08:42:39Z")

</div>

I have a actionperformed script on a button but it seems one of my if statements refused to work.  
see the image beneath, It will print the part marked in yellow, and it says that the variables i used are the same. But the things i want to do in the if statement are not executed at all.

(the writings to label and button are just for testing because of this bug)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/957a13349561c6335f98c69dd86638547c85742f.png)

---

<div class="post-metadata">

**Author:** ![rbanaszak](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rbanaszak/32/6929_2.png) [@rbanaszak](https://forum.inductiveautomation.com/u/rbanaszak)\
**Post date:** [February 19, 2020, 2:17pm UTC](https://forum.inductiveautomation.com/t/bug-if-statement/32410/2 "2020-02-19T14:17:14Z")

</div>

Just taking a quick guess at it, but have you compared the datatypes of what your comparing?  
eg. “print type(tag[user][“UserID”]))” vs “print type(userid)”

---

<div class="post-metadata">

**Author:** ![joostjojo](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@joostjojo](https://forum.inductiveautomation.com/u/joostjojo)\
**Post date:** [February 19, 2020, 2:29pm UTC](https://forum.inductiveautomation.com/t/bug-if-statement/32410/3 "2020-02-19T14:29:14Z")

</div>

hmm, it seems that “self.session.props.auth.user.id” is indeed not an integer. I used the userid as integer. Thanks
