|
Joined: Dec 2002
Posts: 2,033
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2002
Posts: 2,033 |
I also tested /var without the equals signs with same result. alias testvar {
var -s %var1 = test1
var -s %var2 = test2
var -s $+(%,var3.,%var2) = %var1
echo -a $eval($+(%,var3.,%var2),2) <-- does not work
echo -a ---
set -ls %var1 test1
set -ls %var2 test2
set -ls $+(%,var3.,%var2) %var1
echo -a $eval($+(%,var3.,%var2),2) <-- works
} v6.21 ~ Edit ~
Tested on all versions back to v5.91t with the same results.
|
|
|
|
Joined: Oct 2006
Posts: 166
Vogon poet
|
Vogon poet
Joined: Oct 2006
Posts: 166 |
Kind Regards, blink
|
|
|
|
Joined: Jul 2006
Posts: 4,222
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,222 |
There are many thread about that, anyway, it's not a bug to me, /var always assume variable name begin with a %, if not, then the var is not set so : var -s $+(%,var3.,%var2) = %var1 < this command won't be done  however, you can specify other variable witch will be set : var -s $+(%,var3.,%var2) = %var1 ,%b 2
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Dec 2002
Posts: 2,033
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2002
Posts: 2,033 |
|
|
|
|
Joined: Jul 2006
Posts: 4,222
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,222 |
Ok, i know my english is poor but what is the point you didn't get ?
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Dec 2002
Posts: 503
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 503 |
Wims, I think it's you who's not getting it. The idea is to create a dynamic variable name, even if it's only within the local scope. It works fine using '/set', but not with '/var'. RoCK, does the non-$+() form work?
var -s % $+ var3. $+ %var2 = %var1
_OR_
var -s % [ $+ var3. $+ %var2 ] = %var1
|
|
|
|
Joined: Jul 2006
Posts: 4,222
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,222 |
Ah, sorry  I think /var -s $+(%,var3.,%var2) = %var1 works as it should but for both of your example, i don't know how mirc have to react
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Dec 2002
Posts: 503
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 503 |
I think /var -s $+(%,var3.,%var2) = %var1 works as it should but for both of your example, i don't know how mirc have to react
It should create a local variable called '%var3.test2' with the value of 'test1'.
|
|
|
|
Joined: Dec 2002
Posts: 2,033
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2002
Posts: 2,033 |
Ok, i know my english is poor but what is the point you didn't get? Sorry Wims I left shortly after making my reply. Yes, pretty much what you said is the reason I started the thread. It should work and actually does work using /set -l. Bekarvar -s %var3. [ $+ [ %var2 ] ] %var1 var -s % $+ var3. $+ %var2 %var1 Those methods work if the equals sign is not used. If the equals sign is used with either you get... * Set %var3.test2 to = test1 - = test1 <-- does not work Anyway, using /set -l worked and I'm fine with using that if this can't or won't be fixed.
|
|
|
|
Joined: Jul 2006
Posts: 4,222
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,222 |
It should work and actually does work using /set -l. No, i don't agreed : //Var -s $+(%,a) 1 has never worked. It's what you want ( i want too ), but not what mirc sould do.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Dec 2002
Posts: 503
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 503 |
//Var -s $+(%,a) 1 has never worked.
Thus why this is a 'bug'. It *SHOULD* work.
|
|
|
|
Joined: Jul 2006
Posts: 4,222
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,222 |
Lol, like i said in my previous post, i don't think so. i don't have any prooves to say that but : i think the fact is that mirc already doing something when variable name not begining with a '%', mirc not set the variable as You want or as the 'logical' want but ignore it.Maybe i'm wrong but i still think it's more a feature suggestion and i like it, than a 'bug'
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
|