egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

tclhttp error

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
kanibus
Halfop


Joined: 03 May 2005
Posts: 44

PostPosted: Wed Sep 07, 2005 4:38 am    Post subject: tclhttp error Reply with quote

hey im getting an error using tclhttp
Quote:
can't read "state(-urlencoding)": no such variable.

using the latest version of tclhttp with the following code:
Code:
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
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed Sep 07, 2005 5:01 am    Post subject: Reply with quote

hey read the top sticky post
Back to top
View user's profile Send private message Visit poster's website
kanibus
Halfop


Joined: 03 May 2005
Posts: 44

PostPosted: Wed Sep 07, 2005 12:30 pm    Post subject: Reply with quote

edited
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed Sep 07, 2005 12:52 pm    Post subject: Reply with quote

post .set errorInfo results

also, you use undefined/uninitialized variable $tok
Back to top
View user's profile Send private message Visit poster's website
kanibus
Halfop


Joined: 03 May 2005
Posts: 44

PostPosted: Wed Sep 07, 2005 6:13 pm    Post subject: Reply with quote

sorry here is the errorInfo
Quote:
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 Very Happy
Back to top
View user's profile Send private message
kanibus
Halfop


Joined: 03 May 2005
Posts: 44

PostPosted: Sun Sep 11, 2005 1:16 pm    Post subject: Reply with quote

does anyone maybe have an example script i can look at using tclhttp ??
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Sep 11, 2005 1:25 pm    Post subject: Reply with quote

rssnews.tcl
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber