The first on text event/write is missing the filename on the /write command

On the second event, you have a dot at the end of the path in $read()

If you want to increase a counter, you don't need to use a text file for that, use a global variable:
Code:
on *:text:!dc &:#: {
 ;the & above makes sure $2 (the second word) is filled
  inc %death
  msg # Death Count: %death
}

Last edited by Wims; 07/10/14 01:22 AM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel