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.

Stat bot error message

Old posts that have not been replied to for several years.
Locked
P
PeterClark0

Stat bot error message

Post by PeterClark0 »

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
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

that the variable alist doesnt exist....
P
PeterClark0

Post by PeterClark0 »

GodOfSuicide wrote:that the variable alist doesnt exist....
do you know how I can solve this error?
D
Darkj
Halfop
Posts: 86
Joined: Sun Jul 06, 2003 9:58 pm

Post by Darkj »

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 »

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 :)
D
Darkj
Halfop
Posts: 86
Joined: Sun Jul 06, 2003 9:58 pm

Post by Darkj »

Hmmm, I don't see the problem there, do you have a link to the entire script?
P
PeterClark0

Post by PeterClark0 »

http://www.r0x0ring.com/scripts.php - The database seems to be down at the moment, so I'll upload the script Here
:)[/url]
D
Darkj
Halfop
Posts: 86
Joined: Sun Jul 06, 2003 9:58 pm

Post by Darkj »

What the heck is a hqx file? Try putting it as a .tcl or zip or gz or something that i can open.
D
Darkj
Halfop
Posts: 86
Joined: Sun Jul 06, 2003 9:58 pm

Post by Darkj »

Ok I got the binhex script now, I'll take a look at the script.
D
Darkj
Halfop
Posts: 86
Joined: Sun Jul 06, 2003 9:58 pm

Post by Darkj »

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 »

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 »

aww any one got any ideas? :-?
P
PeterClark0

Post by PeterClark0 »

okay I still get the errors, anyone know an alternative, same style stat script?
F
Fe|on

Post by Fe|on »

PeterClark0 wrote:okay I still get the errors, anyone know an alternative, same style stat script?
http://www.visions-of-fantasy.de/
Locked