4 Replies Latest reply on Aug 20, 2014 7:42 AM by All Rights Released

    For loop keeps getting Syntax Error

    All Rights Released
      for (var i = 1; i < 8; i++)
      {
          for (var n = 1; n < 8; n++)
          {
              var f = getField ("OT0" + i + "0" + n);
              f.setAction("Format", "AFNumber_Format\(0, 1, 0, 0, \"\", false\);");
              f.setAction("Keystroke", "AFNumber_Keystroke\(0, 1, 0, 0, \"\", false\);");
          }
      }
      

       

      The above code gets me

       

      SyntaxError: syntax error
      1:Console:Exec
      undefined
      

       

      Even an empty for-loop below ends in the same error.

       

      for (var i = 1; i < 8; i++)
      {
      }
      

       

      What's the matter?