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.
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Sat Jun 02, 2007 1:41 am
Can anyone help me add this:
Code: Select all
foreach t [utimers] { if [string match *Madlib* [lindex $t 1]] { killutimer [lindex $t end] } }
In to this line:
Code: Select all
if {$Madlib(extended) >= $Madlib(extend)} { putserv "privmsg $c :Not enough players in this round...minimum of 3 players required...ending game.." ; set Madlibforthisroundflag 1 ; set nextMadlib 1 } }
I try this but it crahes
Code: Select all
if {$Madlib(extended) >= $Madlib(extend)} { putserv "privmsg $c :Not enough players in this round...minimum of 3 players required..ending game.." ; foreach t [utimers] { if [string match *Madlib* [lindex $t 1]] { killutimer [lindex $t end] } }
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Sat Jun 02, 2007 9:53 am
Try splitting it up on multiple lines, like this.
Code: Select all
if {$Madlib(extended) >= $Madlib(extend)} {
putserv "privmsg $c :Not enough players in this round...minimum of 3 players required..ending game.."
foreach t [utimers] {
if [string match *Madlib* [lindex $t 1]] {
killutimer [lindex $t end]
}
}
Now it's quite easy to see that you're lacking one } in the end. Add it, and your code should be fine.
NML_375