Hello yamaz,
mIRC replaces each single # caracter (not affixed to a word, so) by the channel name associated to the event.
For example, in a ON *:TEXT:#:, # returns $chan, the channel where the event was triggered (e.g. #Scripts)
In an 'manual' alias on a channel, or an alias called via your popups menu, # returns the value of $active, the channel name so. For example, if you put an /echo > # in your alias, you will see the replacement.
So, with that, you understand that your comparaison looks like..
IF (a caracter == a channel name)
For example, if you are on #Scripts: $left($active,1) = # et # = #Scripts, which finally look like :
IF (# == #Scripts)
.. and that, that can not work !
Two solutions so:
* The better way, i think, is to use if ($active ischan), no problem here, or simply if ($chan), which check if we are on a channel.
* I you want to use # like a caracter, you can use $chr(35) ou $(#,0) so that mIRC does not replace it by a channel or no-value. Like that, mIRC does not evaluate this caracter.
I hope that will help you.