1. %VariableThatDoesNotExist is null.
Code:
echo $chan this part triggers
if ($eval($+(%,VariableThatDoesNotExist,$nick),2) != $null) {
blah blah
}
echo $chan this part triggers
else {
echo $chan This part does not trigger.
}
Since it does not triger for the != $null, it should trigger for else { }, right?
No, an else/elseif have to be used directly after the if statement.
2.
mIRC goes crazy when it comes to variables that does not exist.
I have.
%seenchans #list,#of,#channels
If I have.
elseif (($istok(%seenchans,$target,44)) || ($target == $me)) {
Will only trigger for %seenchannels.
But if I have..
elseif (($istok(%seenchans,$target,44)) || ($target == $me)) && ($istok(%VariableThatDoesNotExist,$target,44)) !ison $target) {
It will trigger for all channels.
elseif (($istok(%seenchans,$target,44)) || ($target == $me)) {
This line is correct, i'm not sure why it's not working for you but :
elseif (($istok(%seenchans,$target,44)) || ($target == $me)) && ($istok(%VariableThatDoesNotExist,$target,44)) !ison $target) {
This line is wrong in any case because $istok can only return $true or $false, so you trying to do something like //if ($true/$false !ison $target) { } and because of the &&, this will never work