This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
-
Leon--
- Voice
- Posts: 14
- Joined: Sat Sep 02, 2023 8:35 am
Post
by Leon-- »
Hi,
I have a script but it won't work, what is the solution for this ?
bind time - "43 12 4 * *" msg:videoland1
proc msg:videoland1 {nick host hand chan arg} {
global botnick opchan videoland trigger statschan
if {$botnick == "$videoland"} {
putserv "PRIVMSG $statschan :${trigger}-videoland 1"
timer 1 videoland2
return 0
}
}
proc videoland2 {} {
global botnick statschan
putserv "PRIVMSG $statschan :.videoland"
}
-
CrazyCat
- Revered One
- Posts: 1333
- Joined: Sun Jan 13, 2002 8:00 pm
- Location: France
-
Contact:
Post
by CrazyCat »
Well, first thing to see :
Minute, hour, day, month have a zero padding so they are exactly two characters long; year is four characters. Flags are ignored.
So, try:
bind time - "43 12 04 * *" msg:videoland1
Another thing to see, it's if your proc is called. Check it with:
proc msg:videoland1 {nick host hand chan arg} {
global botnick opchan videoland trigger statschan
putlog "OK, we are in msg:videoland1 and will compare $botnick against $videoland"
if {$botnick == "$videoland"} {
putserv "PRIVMSG $statschan :${trigger}-videoland 1"
timer 1 videoland2
return 0
}
}
-
Leon--
- Voice
- Posts: 14
- Joined: Sat Sep 02, 2023 8:35 am
Post
by Leon-- »
Thanks
-
caesar
- Mint Rubber
- Posts: 3778
- Joined: Sun Oct 14, 2001 8:00 pm
- Location: Mint Factory
Post
by caesar »
And use buit-in
isbotnick instead of that prone to fail if:
to:
Once the game is over, the king and the pawn go back in the same box.