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.
LorT
Voice
Posts: 15 Joined: Sun Mar 09, 2003 6:11 pm
Post
by LorT » Fri Apr 09, 2004 5:53 pm
Code: Select all
proc team:tmatchlist {channel} {
global tfile
if {![file readable $tfile(dir)/tmatch-$channel]} {
set fileio [open $tfile(dir)/tmatch-$channel w]
puts $fileio ""
close $fileio
}
putlog "1"
return $tfile(dir)/tmatch-$channel
putlog "123"
}
the bot return
[17:28] 1
[17:28] Tcl error [team:addmatch]: invalid command name "get"
the fiel is writed in $tfile(dir) with the name tmatch-#channel_name
any help with the error message?
i dont see command get in my code.
strikelight
Owner
Posts: 708 Joined: Mon Oct 07, 2002 10:39 am
Contact:
Post
by strikelight » Fri Apr 09, 2004 6:19 pm
LorT wrote: Code: Select all
proc team:tmatchlist {channel} {
global tfile
if {![file readable $tfile(dir)/tmatch-$channel]} {
set fileio [open $tfile(dir)/tmatch-$channel w]
puts $fileio ""
close $fileio
}
putlog "1"
return $tfile(dir)/tmatch-$channel
putlog "123"
}
the bot return
[17:28] 1
[17:28] Tcl error [team:addmatch]: invalid command name "get"
the fiel is writed in $tfile(dir) with the name tmatch-#channel_name
any help with the error message?
i dont see command get in my code.
You didn't post the code related to the error... The message tells you that the error occurs in the procedure 'team:addmatch' (which again, you didn't post).
LorT
Voice
Posts: 15 Joined: Sun Mar 09, 2003 6:11 pm
Post
by LorT » Fri Apr 09, 2004 6:35 pm
Code: Select all
proc team:addmatch {nick uhost handle channel arg} {
global tmatch
set check [team:charfilter $arg]
if {$check!=1} {
putserv "notice $nick :Invalid Character"
return0
}
if {([lsearch $arg "team(*"]==-1) || ([lsearch $arg "date(*"]==-1) || ([lsearch $arg "map(*"]==-1)} {
putserv "notice $nick :Invalid args, your need to enter at least the team(x), date(hh:mm-dd/mm/yy) and map(x) (+ info(x))"
return 0
}
set startindex [lsearch $arg "date(*"]
set buf [lrange $arg $startindex end]
set infos [string range $buf 5 [expr [string first ")" $buf]-1]]
set errormsg [team:checkdate $infos]
if {$errormsg!=1} {
putserv "NOTICE $nick :$errormsg"
return 0
}
set infos [clock scan [string map {- { }} $infos]]
team:counter $channel
set infos [linsert $infos 0 $tmatch_counter ]
Code: Select all
proc team:counter {channel} {
global tmatch_counter
set fileio [open [team:tmatchlist $channel] r]
set team_list [get $fileio]
close $fileio
set tmatch_counter [lindex [lindex [lsort -integer index 0 $team_list] end] 0]
if {$tmatch_counter==""} {
set tmatch_counter -1
}
incr tmatch_counter
return tmatch_counter
}