i told you it would affect reading and writeing to files both
i'm not going to go though each line and fix it for you, because u'll learn nothing.
look at my examples and learn how to aply the methods to the rest of the code
write -c $scriptdir $+ $did(4) $+ \ $+ $did(4) $+ .amg
should be
write -c $+(",$scriptdir,$did(4),\,$did(4),.amg")
all i'm doing is useing $+() instead of so many $+ 's .. and placing a " at the start and end of the path
so that for example
write "c:\some path\filename"
will atempt to write to the correct filename in the correct location
however
write c:\some path\filename
mIRC sees 'c:\some' as the first parm and 'path\filename' as the 2nd
and so mIRC trys to write to "c:\some"
if the $+() is confusing .. you could simply " $+ $scriptdir .... $+ "
but anywhere that you read/write from/to a file you should get in the habbit of placing the full path in "qutation marks"
Cobra^