Well, as for spacing, that's the way the mIRC script parser works, correct spacing is important
It will work as one line, you just need to use
| to seperate the multiple commands, like I pointed out in your
other post
on !*^:quit:var %i = 1 | while $comchan($nick,%i) { echo $v1 15 $timestamp $nick <Message for quitting> | inc %i } | haltdef