| View previous topic :: View next topic |
| Author |
Message |
stalix Voice
Joined: 13 Sep 2005 Posts: 23
|
Posted: Wed Jan 04, 2006 7:17 pm Post subject: Countdown problem |
|
|
| Quote: |
set date "October 22 14:00:00 2000"
set msj "have passed with McLaren being losers"
bind pub - !mcloser pub:mcloser
proc pub:mcloser {nick uhost hand chan text} {
global date msj
set dur [expr [clock scan $date]-[clock seconds]]
putquick "PRIVMSG $chan : [duration $dur] $msj"
}
|
<bot> 0 seconds have passed with McLaren being losers
How can fix them? THANKS! |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed Jan 04, 2006 8:11 pm Post subject: |
|
|
[clock seconds] is recent while $date is very old, so you're doing it vise-versa. Replace
| Code: | | set dur [expr [clock scan $date]-[clock seconds]] |
with
| Code: | | set dur [expr {[clock seconds] - [clock scan $date]}] |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
|