I know this has been asked probably a billion times but, I for some reason can't get this code to work. My code is similar the code posted below except I changed the URL. Now my problem is when I call my proc from the bind it always gives me an error. Please any help is appriciated
package require http
bind pub - -projects aproc
proc aproc {n u h c t} {
set token [::http::geturl http://www.tclscript.com/scripts.shtml]
set data [::http::data $token]
# parse $data, see how many project lines there is
puthelp "privmsg $c :total number of projects: $total"
::http::cleanup $token
}
Error:
[20:33] Tcl error [test]: wrong # args: should be "list nick uhost hand chan text"
proc test {nick uhost hand chan text} {
set url "http://www.alt-bin.com/index.php?pg=fd&ch="
set url2 "alt.binaries.sounds.mp3.complete_cd"
set url "$url$url2"
unset url2
set token [::http::geturl $url]
set content [::http::data $token]
::http::cleanup $token
}
is a standard Tcl proc, and you shouldn't override standard Tcl procs (Tcl has no notion of "reserved" words like most programming languages do, and you are allowed to name your procs anything, but it's normally wise to avoid name clashes with standard procs)