I was creating something that mentions which score a user has and also which rank he has got when he joins the trivia chan.
Below is the code:
Code: Select all
proc tgjoinmsg {nick host hand chan} {
global botnick tgplaying tgcmdhelp tgcmdstart tgflagsstart tgcmdstop tgflagsstop tgchan tgscoresbyname tgranksbyname
if {$nick != $botnick} {
set _msg ""
append _msg "Welcome $nick! You're on the [tgcolmisc2][ordnumber $tgranksbyname([strlwr $nick])][tgcolmisc1] rank with [tgcolmisc2]$tgscoresbyname([strlwr $nick])[tgcolmisc1] points."
if {$tgplaying==1} {
append _msg ""
} else {
append _msg ""
}
if {[matchattr $hand $tgflagsstart $tgchan]&&$tgplaying==0} {
append _msg "!!!Enter !start to start the game!!!"
}
append _msg ""
[tgpriv] $chan "$_msg"
}
}
Thanks for all help in advance !!!!!!!
Oh yeah this is the error I get when an unknown user joins the channel:
[13:09:20] Tcl error [tgjoinmsg]: can't read "tgranksbyname(maagd15m)": no such element in array
But I don't know how to fix it Thanks!