mIRC Home    About    Download    Register    News    Help

Print Thread
$hfind help #111161 13/02/05 04:35 PM
Joined: Dec 2004
Posts: 13
S
ScottK Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Dec 2004
Posts: 13
Code:
  
/hadd -m table nick prince charming is gay
//echo -a $hfind(table,prince,0).data return 0
//echo -a $hfind(table,*prince,0,w) return 1


why this is happen ? i need to find the item without the wildcard method , but it didnt works
can someone solve the problem ?

Re: $hfind help #111162 13/02/05 06:33 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
Code:
  
/hadd -m table nick prince charming is gay
//echo -a $hfind(table,prince,0).data return 0
//echo -a $hfind(table,*prince,0,w) return 1


why this is happen ? i need to find the item without the wildcard method , but it didnt works
can someone solve the problem ?


Both those return zero

I suggest you do a /hfree -w table , i would assume you have a table item also called prince or somethingprince which is trigegring that.

I cant work out what you really want to do, so i can only say....

Based apon only the above existing in the table...
$hfind(table,*prince,0,w).data is zero since a item value ending in prince doesnt exist
$hfind(table,prince*,0,w).data is one since a item value begining in prince does exist

Re: $hfind help #111163 14/02/05 03:57 AM
Joined: Feb 2005
Posts: 8
R
remco25 Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
R
Joined: Feb 2005
Posts: 8

$hfind(table,prince,0).data <- searches the data for 'prince'
$hfind(table,*prince,0,w) <- searches the items for '*prince'

$hfind doesn't return the data with the .data property, it searches through it. Asuming you want to return the data for 'prince' in the first case you need to do:
$hget(table,$hfind(table,prince))

Hope this helps.

Remco

Last edited by remco25; 14/02/05 03:58 AM.
Re: $hfind help #111164 14/02/05 06:28 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
You could use the 'r' switch but it makes the search case-sensitive unless you wrap it in /<match>/i, or precede it with (?i)<match>
  • //echo -a $hfind(table,prince,0,r).data