Tip regarding setTimer()
-
Hi all, this may be an extremely obvious tip, but I just fiddled around with some code for about an hour before figuring this out, so if this helps even one person, I'll be glad I wrote this up.
I was using two timers that called each other - A did something for some number of times, then eventually called B. B did something and then called A. The problem was that I didn't know how many times A needed to run, so I just set its count to a really big number and, whenever B called A, I reset the count variable using newTimer. For what ever reason, fuze4 really doesn't like this solution.
Here's the takeaway: Never call multiple newTimer()'s on the same function. You can use -1 for the count parameter to ensure that it will run forever