mIRC Home    About    Download    Register    News    Help

Print Thread
#17988 04/04/03 03:48 AM
Joined: Apr 2003
Posts: 2
C
Cyanide Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
C
Joined: Apr 2003
Posts: 2
I have a variable called FTPad1.delay

I created an alias (below) to set the timers for my ads. However, the timer keeps telling me it's getting invalid parameters. When i insert the variable as %FTPad1.delay it works fine. But when i use the method below it won't work.

alias AdSet { /timer $+ $1 $+ $2 0 % $+ $1 $+ $2 $+ .delay /msg $chan ad }

$AdSet(FTPad,1) <-This goes in a pop-up

What am i doing wrong? There has to be a way to make the timer evaluate that variable properly.

#17989 04/04/03 04:11 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
It's because "% $+ $1 $+ $2 $+ .delay" is getting concatenated, but not evaluated. "timerFTPad1 0 %FTPad1.delay /msg $chan ad"
Use $eval([color:green]$+(...),2)[/color] to combine the string and evaluate it.
Code:
alias AdSet { $+(.timer,$1,$2) 0 $eval($+(%,$1,$2,.delay),2) msg $chan ad }

#17990 04/04/03 04:18 AM
Joined: Apr 2003
Posts: 2
C
Cyanide Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
C
Joined: Apr 2003
Posts: 2
Thanks. I knew it wasn't beeing evaluated but i couldn't figure out how to make it evaluate.


Link Copied to Clipboard