RusselB, you're also including kicks by other people in that.
Crash N Burn, if you do it the way you suggested, there is no need for a variable because you can easily write it directly to the file. Also, the /play command would output the text file without needing a while loop.
Perhaps the best way, so you don't run into the variable length problem would be to use binvars.