Just so you know sOOp, you can write a local variable thus:

var %x = 1, %v = $+(-,$str(v,$chanmodes)), %str