EMEmmaCodes1 Oct, 23:56replies: 1That resets it on every iteration. Initialise the counters before the loop, increment inside it, print after it.
Comments 5
Log in to join the discussion.
Log in Create accountWhere do you set it to 0?
Inside the for loop, at the top.
That resets it on every iteration. Initialise the counters before the loop, increment inside it, print after it.
Moved it up, now WARN: 2, CRITICAL: 2.
Before / inside / after the loop — the classic accumulator pattern.