egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help ctc.tcl error

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
twfay
Voice


Joined: 15 Mar 2005
Posts: 2

PostPosted: Wed Mar 16, 2005 12:21 pm    Post subject: Help ctc.tcl error Reply with quote

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 Sad

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
}
}
Back to top
View user's profile Send private message Send e-mail
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Mar 16, 2005 5:46 pm    Post subject: Reply with quote

change
Code:
set tls_code [lindex $text 0 end]

to
Code:
set tls_code [lindex $text 0]

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
twfay
Voice


Joined: 15 Mar 2005
Posts: 2

PostPosted: Fri Mar 18, 2005 6:38 am    Post subject: Reply with quote

Thanks Sir_fz.. its working LSmile
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber