Two things to note though..

First, 'var' should have an '=' if you assign it a value, i.e.

Code:
var %c = 1

The second is there's a stray ')' in the timer name.

For interest, I usually do loops the other direction, as it doesn't need to equate $chan(0) so often:

Code:
var %c = $chan(0)
while (%c) {
  <code>
  dec %c
}

Anyway smile