error with "if" statment

mabvs:
Yeah, I reverted back trying to debug. As soon as I changed it back to "==", all is working as desired. Thank you all for your help :slight_smile:

There is no reason to revert. The single equal is value assignment, double is comparison. I suggest you learn the operators && and ++. Your code may work but is very bloated without proper use of them.