You had it originally set to set %user to $1 when $1 will always be equal to !mcuser.
Even if you keep it to trigger on '!mcuser *' you can leave $2 $null and it will attempt to write blank to the textfile, that's why I changed it to '!mcuser &' which requires $2 to be filled. You can get the same result by checking if ($2 != $null) { } but that's a bit redundant.
Inspecting your text further, I realize now that your script never even triggered. I believe this is because mIRC is triggering something else prior to this script. Check your remote.ini file for a
event which will trigger to any text.
If mIRC triggers on one event it will not trigger on anything that is beneath it in the same file. You can avoid this by either moving the scripts that are below this event or by putting them in a different remote.ini file. You can accomplish this by pressing File > New and paste it there.