How to add Explore column showing number of days since an ADX upturn?

I am trying to add an Explore column which shows the number of trading days since the last time ADX turned upward when anywhere below 25 (but ever crossing upward through 25 is not a concern). My coding shows a message "Error 29: variable 'adxupturn' is being used without having been initialized" . How to initialize the variable and have code show an Explore column with the number of days? See my code below, including numbered instructions from a related Google search. Thanks, joe60609

// Number of trading days since ADX upturn from anywhere below 25

// 1. Define the condition (e.g., ADXupturn)
a = ADX(14);
prevADX=Ref(a,-1);
ADXupturn = ADX<25 AND a>prevADX AND prevADX<Ref(prevADX,-1);

// 2. Calculate the number of bars (days) since ADXupturn was true.
DaysSinceCondition = BarsSince( ADXupturn );

// 3. Set up the Exploration filter (e.g., show all tickers)
Filter = 1;

// 4. Add the column to the Exploration output
AddColumn( DaysSinceCondition, "Days Since ADXupturn");

I meant to also mention message "Error 29: variable 'adxupturn' is being used without having been initialized" seems to involve this line of code:

DaysSinceCondition = BarsSince( ADXupturn );

// Number of trading days since ADX upturn from anywhere below 25

// 1. Define the condition (e.g., ADXupturn)
a = ADX(14);
prevADX=Ref(a,-1);
ADXupturn = a < 25 AND a>prevADX AND prevADX<Ref(prevADX,-1);

// 2. Calculate the number of bars (days) since ADXupturn was true.
DaysSinceCondition = BarsSince( ADXupturn );

// 3. Set up the Exploration filter (e.g., show all tickers)
Filter = 1;

// 4. Add the column to the Exploration output
AddColumn( DaysSinceCondition, "Days Since ADXupturn");

in line
ADXupturn = a < 25 AND a>prevADX AND prevADX<Ref(prevADX,-1);

you used ADX instead of variable a

You should be using AFL editor syntax check. If you used it you would see two errors, not one that you quoted. The first error is important (I.e..wrong use of ADX function without braces). The second error is just consequence of the first one.

Thanks awilson and Tomasz. The process is operating smoothly now with your help. The error message had my eye focused on the later line of coding which was my first time ever using the BarsSince function. As both of you informed, the error was in an earlier line which apparentlly was a copy/paste/correction error from my long time coding in another process, and manually using the AFL editor syntax check would have focused my eye on the proper line. Thanks !