mIRC Homepage
Posted By: Cyanide Why doesn't this work? - 04/04/03 03:48 AM
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.
Posted By: Nimue Re: Why doesn't this work? - 04/04/03 04:11 AM
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 }
Posted By: Cyanide Re: Why doesn't this work? - 04/04/03 04:18 AM
Thanks. I knew it wasn't beeing evaluated but i couldn't figure out how to make it evaluate.
© mIRC Discussion Forums