My mirc is crashing with this script here:
Remote:
on *:TEXT:!on*:#:{
if ($nick == tylersgaming) {
if ($read(botstatus.txt,t,1) == on) {
}
if ( $read(botstatus.txt,t,1) == off) {
/write -c botstatus.txt
/timerAward 0 1800 /awardPoints $chan
write botstatus.txt on
msg $chan Points will now be awarded.
}
}
}
on *:TEXT:!off*:#:{
if ($nick == tylersgaming) {
if ($read(botstatus.txt,t,1) == off) {
}
if ( $read(botstatus.txt,t,1) == on) {
/write -c botstatus.txt
write botstatus.txt off
/timerAward off
msg $chan Points will no longer be awarded.
}
}
}
Sorry, forgot to include the other part of the script.
Alias:
awardPoints {
var %numUsers = $nick($1, 0)
var %x = 1
while (%x <= %numUsers ) {
var %viewer = $nick($1, %x)
if (%viewer != nightbot && %viewer != tylerb0t) {
;if viewer exists in file, add 1 to wolfcoins, otherwise add them to the 'wolfcoins' file and init at 1
if (%viewer != tylersgaming && %viewer != tylerb0t) {
if ( $read(viewers.txt,w,%viewer) == %viewer) {
var %r = $readn
var %i = $read(wolfcoins.txt,t,%r)
/INC %i
/write -l $+ %r wolfcoins.txt %i
}
else {
write viewers.txt %viewer
$read(viewers.txt,w,%viewer)
/write -l $+ $readn wolfcoins.txt 1
}
}
/INC %x
}
My mIRC only crashes when I'm streaming and when this script is in use. Let me explain what the script does so you can get a better understanding of it. Basically, this script writes too two text files, one of them being the users points, and the other is the names. I have a c+ program that complies both txt files into a spreadsheet so I know which names the points belong too. I just need a different to write to txt files I guess? All help is appreciated.
I would appreciate if someone could rewrite this so it does the same thing but puts less strain on mIRC. Can't wait to see what you guys come up with. XD