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.
Old posts that have not been replied to for several years.
P
PeterClark0
Post
by PeterClark0 » Sun Oct 12, 2003 6:47 am
Whenever I try to use the !top10 command in Papilons stat script I get this error -
Code: Select all
[10:44] TCL error [pap_stats_top10]: can't read "alist": no such variable
Any ideas what this could mean?
Thanks
GodOfSuicide
Master
Posts: 463 Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria
Post
by GodOfSuicide » Sun Oct 12, 2003 9:29 am
that the variable alist doesnt exist....
P
PeterClark0
Post
by PeterClark0 » Sun Oct 12, 2003 9:44 am
GodOfSuicide wrote: that the variable alist doesnt exist....
do you know how I can solve this error?
Darkj
Halfop
Posts: 86 Joined: Sun Jul 06, 2003 9:58 pm
Post
by Darkj » Sun Oct 12, 2003 10:18 am
Open your stats tcl script, and go to the proc pap_stats_top10
Paste that proc here, just the proc though, not the entire script
P
PeterClark0
Post
by PeterClark0 » Sun Oct 12, 2003 10:20 am
Here,
Code: Select all
proc pap_stats_top10 {nick host hand chan arg} {
global stat_arr
if {![string match "*+stats*" [channel info $chan]]} { return }
if {[lindex [split $arg] 0] != ""} {
if {![string match "\#*" [lindex [split $arg] 0]] || ![validchan [lindex [split $arg] 0]]} { puthelp "PRIVMSG $chan :Invalid channel. Use !top10 #chan"; return }
set chan [lindex [split $arg] 0]
}
set chan [string tolower $chan]
foreach a [array names stat_arr] {
if {[set b [lsearch -glob $stat_arr($a) "$chan"]] != "-1"} {
set qnick [lindex $stat_arr($a) 0]
lappend alist [list [lindex $stat_arr($a) [expr $b + 1]] $qnick]
}
}
if {$alist == ""} { puthelp "PRIVMSG $nick :No stats on $chan"; return }
set nlist [lsort -dict -decreasing $alist]
set blist ""; set check "1"
foreach u $nlist {
if {$u == "" || $check > "10"} { break
} else {
append blist "\002 $check.\002 [lindex $u 1] \([lindex $u 0]\)"
incr check
}
}
if {$arg != ""} { puthelp "PRIVMSG $nick :Top 10 $chan:$blist"
} else { puthelp "PRIVMSG $chan :Top 10 $chan:$blist" }
}
Hope thats right
Darkj
Halfop
Posts: 86 Joined: Sun Jul 06, 2003 9:58 pm
Post
by Darkj » Sun Oct 12, 2003 10:22 am
Hmmm, I don't see the problem there, do you have a link to the entire script?
Darkj
Halfop
Posts: 86 Joined: Sun Jul 06, 2003 9:58 pm
Post
by Darkj » Sun Oct 12, 2003 11:09 am
What the heck is a hqx file? Try putting it as a .tcl or zip or gz or something that i can open.
Darkj
Halfop
Posts: 86 Joined: Sun Jul 06, 2003 9:58 pm
Post
by Darkj » Sun Oct 12, 2003 11:13 am
Ok I got the binhex script now, I'll take a look at the script.
Darkj
Halfop
Posts: 86 Joined: Sun Jul 06, 2003 9:58 pm
Post
by Darkj » Sun Oct 12, 2003 11:17 am
Ok, looking at this script. Do you have scores or ranks yet? It could be that because its comming up with alist var not found, is because there is nothing in the var. Meaning no one on the list.
I really don't see anything wrong with it though.
P
PeterClark0
Post
by PeterClark0 » Sun Oct 12, 2003 11:26 am
Darkj wrote: Ok, looking at this script. Do you have scores or ranks yet? It could be that because its comming up with alist var not found, is because there is nothing in the var. Meaning no one on the list.
I really don't see anything wrong with it though.
all I can get working is the !stat command, no other commands work
P
PeterClark0
Post
by PeterClark0 » Sun Oct 12, 2003 5:40 pm
aww any one got any ideas?
P
PeterClark0
Post
by PeterClark0 » Tue Oct 14, 2003 5:13 am
okay I still get the errors, anyone know an alternative, same style stat script?