for attempting porpuses. it seems /hadd already does it.
alias hrep {
if ($0 >= 3) {
if ($hget($1,$2).item == $3-) return 0
else {
if ($hget($1,$2)) hdel $1 $2
hadd $1 $2 $3
return 1
}
}
else return 0
}
When you use:
/hadd [table] [item] [value]
If an item with the same name already exists, mIRC will automatically replace it with the new value.
From the help file:
If the item you are adding already exists, the old item is replaced.
That being said, this is not an identifier. So you really don't need to place return statements. Rather, /echo out Invalid parameters or some other suitable error.