Code: Select all
set url "http://my-page.net/latest.shtml"
if {![info exists egghttp(version)]} {
putlog "egghttp.tcl wurde nicht einwandfrei geladen"
putlog "egghttp_latest.tcl wurde nicht geladen"
} else {
proc your_callbackproc {sock} {
global url
set headers [egghttp:headers $sock]
set body [egghttp:data $sock]
regsub -all "\n" $body "" body
regsub -all -nocase {<br>} $body "<br>\n" body
regexp {<b>(.*)</b>} $body
putlog "'$url'$served"
}
bind pub f|f !testlatest show_latest
proc show_latest { hand idx text } {
global url
set sock [egghttp:geturl $url your_callbackproc]
return 1
}
putlog "egghttp_latest.tcl loaded."
}The errormessage is:
Tcl error [show_latest]: wrong # args: should be "show_latest hand idx text"
Please help me, to fix them