Announcement

Collapse
No announcement yet.

year(0) syntax

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • year(0) syntax

    Hi,

    When I just hit the check mark at the top of the editor for the following code, I do not get a syntax error.

    When I attempt to run the code I get the following :

    SyntaxError: invalid assignment left-hand side

    The error line is identifed as the line with the if statement.
    No error is returned if I omit the "year" out of the if.

    Any suggestions ? Thank You Again




    function preMain() {
    setPriceStudy(true);
    setComputeOnClose(true);
    }

    function main() {

    if ( year(0) = 2014 && month(0) == 7 && day(0) == 14 ) {
    drawTextRelative(0, 17120+5 ,"20",Color.RGB(0 ,250, 0),null,Text.CENTER|Text.VCENTER,"Calibri",11, 0 );
    }




    }

  • #2
    and if it makes any difference I'm using this on a "D" day chart

    Comment


    • #3
      forget it, I needed another " = " sign

      Comment

      Working...
      X