mIRC Homepage

Setting a global dynamic variable

Posted By: Maveric

Setting a global dynamic variable - 16/03/03 06:36 AM

I can't seem to be able to set a global dynamic variable. Say I want a few vars like % $+ $nick. I think I have tried everyway to make it, and I have seen how to make a local var, but not global. Any suggestions?
Posted By: vasil_michev

Re: Setting a global dynamic variable - 16/03/03 10:50 AM

try set $+(%,blabla,$nick) value
Posted By: Maveric

Re: Setting a global dynamic variable - 16/03/03 08:21 PM

Nope frown * /set: invalid parameters
Posted By: NightChillz

Re: Setting a global dynamic variable - 16/03/03 10:05 PM

set %var. $+ $nick This is the data...


and to retrieve it:

a) //echo -a %var. [ $+ [ $nick ] ]

b) //echo -a $eval($+(%,var.,$nick),2)
Posted By: Maveric

Re: Setting a global dynamic variable - 16/03/03 11:40 PM

Still doesn't work. I tried that already.
That just makes a var named "%var." and sets the data as "$+ $nick This is the data...". I need it to be "%var.Maveric" if I do something like "set %var.$me" but I can't seem to get any operator to work, no matter how I format it.
Posted By: NightChillz

Re: Setting a global dynamic variable - 17/03/03 12:52 AM

well, you see, i am telling you that the way i posted above, is how you do it, read the mIRC.hlp file and it will say the samething, the only problem i can see, is that $nick isnt an identifer for the event you are trying to use it on, or your physicaly typing /set %var. $+ $nick

in which case, you need to type TWO // for it to process identifers from the command line...

//set %var. $+ $me This variable(%var. $+ $me $+ ) Holds this data now
//echo -a $eval($+(%,var.,$me),2)


Copy And Paste That Into Any Window(Status or channel) and you will get an echo similar to:


This variable(%var.Stranger) Holds this data now


and you can Open your remote editor, and look at the variables, and would you beleive it....? %var.yourname will BE there!
© 2020 mIRC Discussion Forums