mIRC Home    About    Download    Register    News    Help

Print Thread
#176100 03/05/07 04:52 AM
Joined: Apr 2007
Posts: 13
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Apr 2007
Posts: 13
hi i am a newbie , i want do a hash tables simple

id client
name
last name
adress

and then i want to call with the id number, please
any help , preciate

thnxz


Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Check out this post and download the Array.mrc file (it handles the hash tables). Then setup three arrays, one for first name, one for last name, and one for address.

Code:
;; Example
;; Usage: $addClient(first name, last name, address)
alias addClient {
  array -a name $1
  array -a lastname $2
  array -a address $3
}
;; Usage: /delClient [Index]
alias delClient {
  array -d $1 name
  array -d $1 lastname
  array -d $1 address
}
;; Usage: /delAllClient
alias delAllClient {
  array -f name
  array -f lastname
  array -f address
}
;; Usage: $getClientAddress(1)
alias getClientAddress {
  return $array(address, $1)
}

Also if you want this information available after restarting mIRC you will also need to save on exit and restore on start the following hash tables: Array.name, Array.lastname, and Array.address.

Edit: I will be releasing an updated version of Arrays.mrc to mircscripts.org and my web site within the next week. It will handle saving the arrays for you...

I'll probably have it ready for release today or tomorrow, but no promises here.

Last edited by NaquadaServ; 03/05/07 03:56 PM.

NaquadaBomb
www.mirc-dll.com
Joined: Apr 2007
Posts: 13
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Apr 2007
Posts: 13
thnx so much pal
preciate

Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
No problem smile

The updated Arrays.mrc file (with the ability to save arrays across sessions) is now available at my web site.


NaquadaBomb
www.mirc-dll.com

Link Copied to Clipboard