Originally Posted By: maroon
You didn't fix your parenthesis. The purpose of the echo was to show your error to you, and the "shows:" line was to tell you what the result of the 'echo' would show. An important tool in debugging your problem is to add echo messages so you can see what the script is trying to do.

The $+() identifier joins together several comma-delimited items. The $eval(string,N) identifier evaluates the string, doing it N times, with default one time if the N parameter isn't used. In this case, you're putting the $() output inside the $eval() along with the string of the == and the string of the 1. By enclosing term2 inside the parenthesis, you're transforming this from comparing term1 vs term2 into having no term2 at all and comparing whether term1 is $true or $false.

The echo is showing $v1 as the result of evaluating the string one times due to the ,N parameter not being used. You used $eval up above to evaluate a string twice. See the difference in how this string is evaluated zero one or two times, by pasting each of these commands in an editbox:

//echo -a $eval($ $+ version,0)
//echo -a $eval($ $+ version,1)
//echo -a $eval($ $+ version,2)

Just as important as having matching parenthesis is having them enclosing the correct things.

Ah. I get what you're saying. This is what it looks like now although it still isn't working. How could I get this working?
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

Last edited by DapperBot; 11/01/19 03:40 AM.