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 

dollar tcl, small error

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
testebr
Halfop


Joined: 01 Dec 2005
Posts: 86

PostPosted: Wed Apr 09, 2008 6:30 pm    Post subject: dollar tcl, small error Reply with quote

Code:
bind pub - !dollar dollar
package require http 2.3
proc dollar {n u h c a} {
set ID [::http::geturl http://www.bc.gov.br/htms/infecon/taxas/taxas.htm -timeout 10000]
set X [split [::http::data $ID] \n]
::http::cleanup $ID
regexp {([0-9],[0-9]{4}).*([0-9],[0-9]{4})} $X Z AZ BZ
putserv "PRIVMSG $c :Taxa de compra $AZ / Taxa de venda $BZ"
}


Tcl error [dollar]: can't read "AZ": no such variable

How to fix it?
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Apr 09, 2008 6:57 pm    Post subject: Reply with quote

Perhaps you meant
Code:
regexp {([0-9],[0-9]{3}).*([0-9],[0-9]{3})} $X Z AZ BZ

as there are only 3 digits after the comma and not 4.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
testebr
Halfop


Joined: 01 Dec 2005
Posts: 86

PostPosted: Wed Apr 09, 2008 7:16 pm    Post subject: Reply with quote

thanks, my fault.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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