Quote Originally Posted by Darrel Taylor View Post
Then it continues on to the next IF statement...
Code:
if ((ByteA = 8) and (combocount = %00000001)) then
    combocount = %00000011
    pause 1000
else
    combocount = 0
endif
At this point<b> ByteA does not equal 8 (it's still 7), so it goes to the ELSE clause where it zero's combocount and starts everything from scratch again.</b> It'll never recognize more than 1 digit.
<b>
Then after all the IF's are done, there's nothing to stop it from opening the gate, even though it only received 1 keypress.
</b>

But from the sound of it, it did exactly what you told it to.
<br>
Is that because it has not gone back to the scan routine? Should I have used goto and resume or just put return after each if...then statement? I ask this <b>not </b>ignoring your statement I should not have done it this way in the first place.<br>
<b> Could you explain in more detail as to why? How does combocount get to the correct status to open the gate?</b>
<b>I really appreciate it Darrel.</b>
JS