actionCommentary error

I just updated to AB 6.26 9and 1st time I used this forum since migration from yahoo).

After starting up, AB reports error 29: Variable ‘actionCommentary’ used without having been initialized.

It refers to the following line in my code (that never caused an error before): if(Status(“action”)!= actionCommentary)

Thx for any help.

PS

Make sure you don’t have typo in the code. This works fine:

if( Status("action") == actionCommentary )
{ 
  Say("works fine");
}

In fact, the "error" just moves down if I unedited it:

image

The code is part of an #include_once file.

Probably something I missed in updates that I need to change?

Thx,

PS

Hi Tomasz,

Things get weirder. If I delete all my #include files on top of my code (again, I always have these on top of my code by default and they worked fine), then for this line of code:

FstPosC = ValueWhen((Close<=0 OR IsEmpty(Close)) AND Ref(Close,1)>0,Ref(Close,1));

I get: “Error 29. Variable ‘close’ used without having been initialized.”

???

PS

As I said - there is a typo somewhere in your code. It may be, for example, invisible character that “looks” like space but is not space. Typically such things come to formula by copy-pasting from sources that do not use proper code-only formatting.

But I didn’t change anything in my code. I just updated to AB 6.26 this morning and then suddenly all my windows show errors.

PS

As I demonstrated - actionCommentary works fine. Your formulas may be doing things no-one here knows, so it is up to you to check them. You will find the detailed information about what has changed in the 6.26 read-me. You may be using VarSet/VarGet with incorrect variable names. That is pretty much the only thing that is different.

After going through my #include files, it turns out I had an old function with “Static” as the name of one of its required inputs.

Case closed.