|
Kevvin
|
Kevvin
|
Ok, so i have been messing with 6.3 for a while now, and found that, when i update a file, i.e pelts.txt
and use $read(pelts.txt) It will use old written information.
For example, i have updated my text file to <NOT CONTAIN THE FOLLOWING> <Kevin> gets a knife and kills digweed. <Kevin> gets a knife and kills digweed. ---- Below you will find what pelts.txt really contains. <Kevin> hm <Kevin> see <Kevin> yet <Kevin> my file has this saved <Kevin> throws +username+ in the bush <Kevin> makes sweet love to +username+..... With a razor blade
The only way i can seem to get this updated, is by closing mirc and re-opening it.
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
I can't reproduce this here, and I wouldn't really expect to. $read re-opens the file for each call and doesn't keep any kind of cache to my knowledge. It's more likely to be a problem with your script. If you're calling $read on a timer make sure it's evaluated when the timer fires, not when you start it. The same goes for other commands, notably /scon. For example, this would read a random line from versions.txt before starting the timer and then send it to #channel twice: alias readtest {
.timer 2 5 msg #channel $read(versions.txt,n)
} Whereas this would read a random line from versions.txt each time the timer fires: alias readtest {
.timer 2 5 msg #channel $!read(versions.txt,n)
}
|
|
|
|
Kevvin
|
Kevvin
|
There are no timers involved, infact, I didnt encounter this problem until i upgradded to 6.3.
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
Can you provide a script that reproduces the problem?
|
|
|
|
Kevvin
|
Kevvin
|
on *:input:#: { if ($1 == !pelt) { msg $chan $replace($read(pelts.txt),+username+,$2-) | halt } }
|
|
|
|
Joined: Dec 2002
Posts: 1,996
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,996 |
Is pelts.txt in the install folder and $mircdir is in the application data folder where $read with no path is looking for the file?
~ Edit ~
Did that make sense?
|
|
|
|
Joined: Dec 2002
Posts: 2,884
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,884 |
I can't reproduce this here. The file is re-read each time it is updated.
What happens if you open pelts.txt in a text editor? Does it display the updated file contents?
Also, what command(s) are you using to update the file?
|
|
|
|
Kevvin
|
Kevvin
|
if i open the file after i save it, in note-pad it shows the new content, but as for mIRC reading it, it's not working, I know what i'm talking about, i have been using mIRC for many years, I know it's not me, Maybe a bug between vista and mIRC still?
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
The fact you just said Vista makes me think you probably are $read'ing one file and opening another in notepad. Make sure you're opening the file in $mircdir. If $mircdir is in Program Files it's also possible Vista may redirect $reads to your VirtualStore folder, so check there, too.
You could also make it easier to check by using an absolute path to a file somewhere outside of Program Files.
|
|
|
|
Joined: Dec 2002
Posts: 3,841
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,841 |
Are you storing your mirc.ini and other settings in the "Program Files\mIRC" folder? If you are, and you are using Vista, then that won't work. For Vista-compatible applications, such as mIRC 6.3, Vista does not allow writing to the "Program Files" or other protected folders and does not use the Virtual Store folder to redirect non-compatible read/write requests.
|
|
|
|
|