Originally Posted By: maroon
The $() identifier is an alias for $eval(), so in effect you're un-necessarily using $eval() twice. Plus you now don't even have a term#2. When you use the == operator it's required to have a term#2, even if you use $null.

Also, you don't want to evaluate the assembled variable once, because as the 3 echoes showing the 3 levels of evaluation, you're comparing a string beginning with a percent sign against 'nothing', which will never be true.

If you've correctly loaded the %ageCount variable with the value of the dynamic variable, you could use %ageCount inside your if() statement instead of repeating the assembly of the dynamic variable again.


Like I said at the beginning, I am extremely new to this programming language. All I want is to count how many times the message is sent and if it reaches <3, 3 or >4 then do something different. My code remains to look that same as above as I don't understand what I am needing to change in your latest message.
Code:
on *:TEXT:how old is dapper:#: {
     var %ageCount = $eval($+(%,ageCount.,$nick),2)
     inc %ageCount. $+ $nick 1
     if ($($eval($+(%,ageCount.,$nick),1)) ==) {
          msg $chan !age $nick
     }
}