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 ctc.tcl error

Support & discussion of released scripts, and announcements of new releases.
Post Reply
t
twfay
Voice
Posts: 2
Joined: Tue Mar 15, 2005 2:20 pm

Help ctc.tcl error

Post by twfay »

Hi can any 1 help me for this ctc.tcl error? i dl from eggdrop.org scripts there , but when i run it , it show me this error
when i type !code 123456
Tcl error [tls:code]: wrong # args: should be "lindex list index"
Can any 1 help me settle this prob?
thanks :(

proc tls:code {nick uhost hand chan text} {
global tls_code tls_number tls_game tls_hint tls_chan tls_ctc tls_ctcs
global tls_frase11_1 tls_frase11_2 tls_frase12_1 tls_frase12_2
if {$tls_game == "on"} { return }
if {$tls_chan != $chan} { return }
if {[info exists tls_ctcs($nick)]} {
set score [lindex $tls_ctcs($nick) 0]
set hints [lindex $tls_ctcs($nick) 1]
set wrong [lindex $tls_ctcs($nick) 2]
} else {
tls:update $nick 0 0 0
lappend tls_ctc(nicks) $nick
set score 0;set hints 0; set wrong 0
}
set tls_code [lindex $text 0 end]
if {$tls_code == $tls_number} {
set tls_game "on"
set tls_hint "0"
incr score 1
tls:update $nick $score $hints $wrong
putserv "PRIVMSG $tls_chan :$tls_frase11_1 $nick $tls_frase11_2 \00304$tls_number\003."
foreach j [utimers] {
if {[lindex $j 1] == "tls:answer"} { killutimer [lindex $j 2] }
}
tls:save
return 1
} else {
incr wrong 1
tls:update $nick $score $hints $wrong
putserv "PRIVMSG $tls_chan :$tls_frase12_1 $nick $tls_frase12_2"
tls:save
return 1
}
}
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

change

Code: Select all

set tls_code [lindex $text 0 end]
to

Code: Select all

set tls_code [lindex $text 0]
t
twfay
Voice
Posts: 2
Joined: Tue Mar 15, 2005 2:20 pm

Post by twfay »

Thanks Sir_fz.. its working L:)
Post Reply