Thanks, looked like it was going to work but it didnt

Ive checked my variables spelling, gone through it. I can call the varialbles in another alias and have the messaged to channel, I just cant get the initial if statement evaluated and the variables set.
Could it be the server preventing that particular command?
Does $nick(#channel,0) work for anyone else?