mIRC Home    About    Download    Register    News    Help

Print Thread
#112913 27/02/05 07:48 PM
Joined: Mar 2004
Posts: 540
A
Armada Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
Not sure if this is a bug or Im just seeing it wrong but here goes. Im writing a script that tracks nicks and their hosts. Im dinking around and I have a entry
sssss *!*@IRChat-313F98A5.brhm.adsl.virgin.net
in a hashtable Now I go to try to get that info and I use $hfind
//echo -a $hfind(NickTracker,*!*@IRChat-313F98A5.brhm.adsl.virgin.net,0)
Echos 0, now I think well maybe the thing didnt go in right but when I do
//echo -a $hfind(NickTracker,*!*@IRChat-313F98A5.brhm.adsl.virgin.net,1)
I get the insufficent parameters so I add data to the end
//echo -a $hfind(NickTracker,*!*@IRChat-313F98A5.brhm.adsl.virgin.net,1).data
and I get sssss
Shouldnt the 0 come up with 1? saying I have one entry with that in it? Or am i just seeing this wrong?

#112914 27/02/05 07:59 PM
Joined: Dec 2002
Posts: 208
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 208
By default, $hfind looks for an item name that matches the wildcard text. You are looking for values that match the wildcard, so you need the .data property. Try this:

//echo -a $hfind(NickTracker,*!*@IRChat-313F98A5.brhm.adsl.virgin.net,0).data

It is simply your first //echo with .data at the end.


If I knew now what I will know then... maybe things will have been different...
#112915 27/02/05 08:00 PM
Joined: Mar 2004
Posts: 540
A
Armada Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
Ahh thank you im an idiot


Link Copied to Clipboard