mIRC Home    About    Download    Register    News    Help

Print Thread
#248399 07/10/14 01:09 AM
Joined: Mar 2014
Posts: 65
E
Exuviax Offline OP
Babel fish
OP Offline
Babel fish
E
Joined: Mar 2014
Posts: 65
I have tried everything!

I can't get

Code:
on *:text:!dc *:#: {
  msg # Death Count: $2
  write -c C:\Users\Randy\Desktop\mirc $2
}
on *:text:!death:#: {
  var %cow $read(C:\Users\Randy\Desktop\mirc\death.txt.) 
  msg # Death Count: %cow
}


I can not get the !death to work,
It just says "Death count:"


Actually, now that I got you here. What I really wanted was something like this

Code:
on *:text:!dc *:#: {
  var %death %read(C:\Users\Randy\Desktop\mirc\death.txt)
  var inch %death
  msg # Death Count: %death
  write -c C:\Users\Randy\Desktop\mirc\death.txt %death
}



But this won't count past 2.

Last edited by Exuviax; 07/10/14 01:16 AM. Reason: What I originally intended

I do things with stuff that makes other things do stuff.
Joined: Jul 2006
Posts: 4,144
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
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

Link Copied to Clipboard