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.
kanibus
Halfop
Posts: 44 Joined: Tue May 03, 2005 7:22 am
Post
by kanibus » Wed Sep 07, 2005 4:38 am
hey im getting an error using tclhttp
can't read "state(-urlencoding)": no such variable.
using the latest version of tclhttp with the following code:
Code: Select all
set cztrig .czlid
bind PUB -|- $cztrig steam_query
proc steam_query { nick host hand chan text } {
if { [string match "" "$text"] } {
putserv "NOTICE $nick :usage: .czlid <steamid> example: .czlid 0:1:2345"
} else {
search_id $chan $text
}
}
proc search_id { chan string } {
set url "czleague.org/index.php?div=&action=steamidsearch&submit=1"
set czid [::http::formatQuery steamid $string]
set tok [::http::geturl $url -query $czid]
set page [::http::data $tok]
if {[::http::ncode $tok] != 200} {
set text "An error occured while connecting to the CZL database."
putserv "NOTICE $chan :$text"
::http::cleanup $tok ; return
}
set fs [open search.results w]
puts $fs "$page"
close $fs
}
any help is much appreciated
Last edited by
kanibus on Wed Sep 07, 2005 6:15 pm, edited 6 times in total.
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Wed Sep 07, 2005 5:01 am
hey read the top sticky post
kanibus
Halfop
Posts: 44 Joined: Tue May 03, 2005 7:22 am
Post
by kanibus » Wed Sep 07, 2005 12:30 pm
edited
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Wed Sep 07, 2005 12:52 pm
post .set errorInfo results
also, you use undefined/uninitialized variable $tok
kanibus
Halfop
Posts: 44 Joined: Tue May 03, 2005 7:22 am
Post
by kanibus » Wed Sep 07, 2005 6:13 pm
sorry here is the errorInfo
Currently: can't read "state(-urlencoding)": no such variable
Currently: while executing
Currently: "encoding convertto $state(-urlencoding) $string"
Currently: (procedure "mapReply" line 13)
Currently: invoked from within
Currently: "mapReply $i"
Currently: (procedure "::http::formatQuery" line 5)
Currently: invoked from within
Currently: "::http::formatQuery steamid $string"
Currently: (procedure "search_id" line 4)
Currently: invoked from within
Currently: "search_id $chan $text"
Currently: (procedure "steam_query" line 6)
Currently: invoked from within
Currently: "steam_query $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"
and thanks for the quick reply
kanibus
Halfop
Posts: 44 Joined: Tue May 03, 2005 7:22 am
Post
by kanibus » Sun Sep 11, 2005 1:16 pm
does anyone maybe have an example script i can look at using tclhttp ??
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Sun Sep 11, 2005 1:25 pm