Hi,

Code:
  
on *:TEXT:!getfarm:#somechannel:{ 
  if ($hget(DarkHash, $nick)) { msg $chan You exist }
  else { msg $chan You dont exist } 
}

Btw you had one too many closing braces }
The problem was that you compared the data of the hash table item "$nick" to the "$nick", which will of course not match, because a nickname is not the same as it's scores.

$hget(darkhash,itemname) --> will check if a certain item has data in the hash table

Suppose an entry in the hash table is:

eendje 50 1000

The item is: eendje
The data is: 50 1000

$hget(darkhash,eendje) will return the data, or: 50 1000
If a person is registered, then it means he has data, if he's not then he doesn't have data. So "$hget(darkhash,$nick)" will return scores if the person is in the hash table. Otherwise it won't return anything.

Hash tables can be visualized like this:

item1 data
item2 data
item3 data
...

An item in a hash table cannot contain spaces. The data can be whatever, even $null.

You can find more explanation in the link I gave you.

A custom identifier for your bot to know whether a person is registered could be:

alias registered return $iif($hget(darkhash,$$1),$true,$false)

Then use: if $registered($nick) { msg $chan You are registered }

Greets

EDIT: You've changed your code in the mean time, so this reply was for your first code not using $address

Last edited by FiberOPtics; 16/09/04 01:53 PM.

Gone.