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.
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 }