Hi Riamus2
Thank you for taking the time to reply and for the script example, However there seems to be some problems with it, again i have no idea why as i didnt know how it was going to work in the first place.
Here is what i did to get it to add text to the latest.txt file
on *:text:*:#mychan: {
if !latest == $1 {
if $nick isop #mychan {
if .add == $2 {
.write latest.txt $3- $ctime
halt
}
alias -l playlatest {
inc %latest.cnt
notice $nick %latest.cnt $+ $chr(41) $gettok($2-,1- $calc($gettok($2-,0,32) - 1),32) $duration($calc($ctime - $gettok($2-,0,32)))
if (%latest.cnt >= $lines(latest.txt)) { unset %latest.cnt }
}
.play -a playlatest $nick latest.txt 1500
}
}
I changed the msg $1 in your code to notice $nick as it came up with the error 'no such nick !latest'
If i use !latest .add test1 and then open the latest.txt file it shows test1 1167171691
But if i then type !latest i get 1) 1929wks 5days 22hrs 24mins 13secs If i add more to latest.txt such as !latest .add test2 and !latest .add test3 etc. it also adds them to the text file but when i type !latest again i get the first entry as before with none of the text that was added (test1, test2 and test3) followed by Unknown command: PLAYLATEST in the status window of the client that is running the script
Any clue what is going wrong?
Thanks again for your time