mIRC Home    About    Download    Register    News    Help

Print Thread
#13458 27/02/03 08:48 PM
Joined: Feb 2003
Posts: 67
N
Naz Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Feb 2003
Posts: 67
In v6.01 I could set a var in an alias using info from a hashtable, i.e.:
var %a = $hget(table, item)
and then use the variable within the alias

With v6.03 however, this method often returns nothing.

Have I missed a change somewhere?

Also, I use the same var in multiple alias' .

alias1 - var %a = this data
alias2 - var %a = other data

Could this cause a conflict or do the var's free themselves at the end of the alias.


Those who live by the sword get shot by those who don't.
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
1. Should work fine. example:
Code:

/hadd -ms test item data


Then try to //echo $hget(test,item)... it will echo 'data'.

You'll have to specify either .item or .data property only when the $hget(table,N) method is used.

For example, to get the first item name, you'd use: //echo $hget(test,1).item, and to get its content: //echo $hget(test,1).data.

-

2. As you thought, local variables never conflict with each other and free themselves when the routine ends.


Link Copied to Clipboard