rocketboy001:
[quote author=Nick Gammon link=topic=124606.msg952005#msg952005 date=1349900411]
Does it work?In general in cases like this:
if (DoorCloseWarn == true) {
Warn(); // go to the Warn function
Booleans can only be true or false, so testing for "== true" is a bit redundant. How about:
if (DoorCloseWarn) {
Warn(); // go to the Warn function
It does work... both my uncle (who I wrote it for) have tested it and it all seems to function correctly. Good point on the DoorCloseWarn == true.
Thanks,
Adam
[/quote]
True. Honestly, I hadn't considered moving it outside the loop because I was not aware of how to work things outside of the loop. I'll have to play with your suggestion - I guess the benefit is that it's one less thing that has to be checked in the loop.