When I looked at the code you pasted, I had (incorrectly) assumed you has pasted the corresponding code related to the error. However, I was in error. You have not shown us the put:hour procedure.
This is one of them - it runs the BBC News script. There's another one I have called put:half (for a half hourly message) which just sends a message to the channel and this also gets the error message.
bind time - "00 * * * *" put:hour
proc put:hour { min hour day month year } {
putserv "PRIVMSG #NewsRoom :12,12 0,4 >Newsroom LIVE 7,7 0,12 World Headlines @ [gettime -18]ET / [gettime -13]GMT "
bbc:parse "http://news.bbc.co.uk/2/low.html" 1 #NewsRoom #NewsRoom
}
Prove you have done what you said, by both showing your newly altered code, and also issue a '.tcl set errorInfo' on your partyline, after the error is generated.
If you had done what you said you had done, you would have nothing to hide. But apparently, you are too proud to admit you faltered in doing something you said, when you didn't. That is what anyone can conclude, from the lack of information provided on your behalf.
LOL I did do what you suggested - why would I not if I was seeking to solve my problem? The reason I didn't post the error again is because it was exactly the same as before so there was no need to 'prove' anything.
Your help did not fix the problem - and now I've just seen it produces the error more than it did before, so your code failed and made the problem worse. So have reverted back to original version.
No pride here - just the facts!
There's no need to act all superior to those of us who are't scripting experts - this is supposed to be a 'help' forum - not to use your knowledge (questionable in this case) to try to make others feel stupid.
% proc gettime { offset } {
set hour [string trimleft [clock format 1075708800 -format "%H"] 0]
set therest [clock format 1075708800 -format "%M"]
set time_ret [expr $hour + $offset]
if {$time_ret > 23} { set time_ret [expr $time_ret - 24] }
if {$time_ret < 0} { set time_ret [expr $time_ret + 24] }
return $time_ret:$therest
}
% gettime -18
9:00
% gettime -13
14:00
%
(note: 1075708800 is 08:00 GMT as per your description of where the error occurs)
So there are the facts.. the conclusion: you didn't do what you were told, thus you didn't want help from the get go.
This would run once and hour on the hour. However, you have been sugesting that your code runs at 08:30. Which is pretty must 1/2 an hour too late (or early).
Another note, you should be quoting your string in full if your are returning more than one thing. Keeps things safe.
I just copied and pasted the above script into the bot, and my half-hour message said the time of the previous top of the hour (said 6:00ET when should have been 6:30)
Just to confirm I have hourly and half hourly msgs...