mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2004
Posts: 2
M
Bowl of petunias
OP Offline
Bowl of petunias
M
Joined: Jun 2004
Posts: 2
When running mirc, after 24-48 hours of running I get an error on a write statement I have in my script /write unable to open file. This file is written to regularly, and when I try to write to it manually it gives me the same error. Upon restarting mirc it works and i can write to the file again. Is this a bug or is something else causing this?

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I doubt it's a bug. It would help to see the part of your script that deals with that (or your whole script would probably be better, but that's up to you).


Invision Support
#Invision on irc.irchighway.net
Joined: Jun 2004
Posts: 2
M
Bowl of petunias
OP Offline
Bowl of petunias
M
Joined: Jun 2004
Posts: 2
Heres the function:
on *:join:#gzzone1234: {
set %tmpvar $read(ipd.txt,w,$nick $+ $chr(42))
if (%tmpvar) {
%tmpvar = $puttok(%tmpvar,$calc($gettok(%tmpvar,3,24) + 1),3,24)
write -l $+ $readn ipd.txt %tmpvar
msg $chan Welcome back $nick $+ ! You've been here $gettok(%tmpvar,3,24) times!
}
else {
write ipd.txt $nick $+ $chr(24) $+ $address($nick,2) $+ $chr(24) $+ 1
}
}

Something weird, I can /write to the file, but if I try to insert a line it gives me the write error. This only happens after a day or two of running.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Hm. Maybe there is some limit on editing lines on a large file that I don't know about. Even so, a hash table would be better for this sort of thing. smile


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard