Error with semi-colon, using a loop for writing to a file

Also, please use backticks to quote code:

2 Likes