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 modify script

Help for those learning Tcl or writing their own scripts.
Post Reply
c
cache
Master
Posts: 306
Joined: Tue Jan 10, 2006 4:59 am
Location: Mass

Help modify script

Post by cache »

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] }  }
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
Post Reply