mIRC Home    About    Download    Register    News    Help

Print Thread
#127399 13/08/05 07:30 AM
Joined: Feb 2005
Posts: 74
S
SkyD Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Feb 2005
Posts: 74
Heyaa! I'm interested to make a hash table, i try but something is wrong and it don't saves test.hsh !!! Please someone make a hashtable which will be in the left and the width will be 100px ~~ ;P and how can i put the dialog on the hash table ??


[color:red]m[color:blue]IRC[color:green] for EvEr

#127400 13/08/05 12:05 PM
Joined: Aug 2005
Posts: 128
S
Vogon poet
Offline
Vogon poet
S
Joined: Aug 2005
Posts: 128
Hash tables are storing data, they have no size in pixels. Dialogs are windows, hash tables are a way of storing data. Exemple:
Code:
alias comment {
  if (!$hget(nicehash)) hmake nicehash 100
  if ($exists(info.hsh)) hload nicehash info.hsh
  hadd nicehash $1 $2-
  hsave nicehash info.hsh
  hfree nicehash
}
alias rcomm {
  if (!$hget(nicehash)) hmake nicehash 100
  if ($exists(info.hsh)) hload nicehash info.hsh
  var %a = $hget(nicehash,$1)
  hfree nicehash
  return %a
}

Usage:
/comment <nickname> <comment>
//echo -a $rcomm(nickname)
The comment about that nick will be stored in file info.hsh.
Exemple:
/comment stefys a smart guy
//echo -a $rcomm(stefys)
will say "a smart guy" laugh

#127401 13/08/05 02:15 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Actually, if you're expecting to store 100 max items then N should be 10, you divide 100 by 10.

-Andy

#127402 13/08/05 07:37 PM
Joined: Aug 2005
Posts: 128
S
Vogon poet
Offline
Vogon poet
S
Joined: Aug 2005
Posts: 128
Ok.. then change 100 to 10


Link Copied to Clipboard