Announcement

Collapse
No announcement yet.

Invalid Parameter

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

  • Invalid Parameter

    I am trying to use the drawLineAbsolute function and have been getting the following error from the following relevant code:

    Error:
    Parameter Number 8 of Function drawLineAbsolute is invalid

    relevant Code:
    drawLineAbsolute( 0, nextcci21, 1, nextcci21, PS_SOLID, 3, Color.yellow, cci21Tag);

    All variables are declared including cci21Tag (the 8th parameter). Can anyone please help me find the cause of this problem or could you suggest a way to troubleshoot it?

    Thanks.

  • #2
    Snickers,

    comment out the offending line of your code and insert a debugPrintln statement as follows:

    debugPrintln("cci21Tag = "+cci21Tag);

    this should tell you if the parameter is truly invalid.

    you can also try changing the step (temporarily) as follows:

    drawLineAbsolute( 0, nextcci21, 1, nextcci21, PS_SOLID, 3, Color.yellow, "cci21Tag");

    Now this will draw a line, then, as the script loads, continue to overwrite the previous line until the efs is fully loaded. You will be able to see the last line though.

    Comment


    • #3
      I have a similar problem. The EFS Help file says:

      "optional. a unique identifier for this line object or null"

      For instance, if you do this, it works:

      drawLineAbsolute( -40, v4p, 2 , v4p, PS_SOLID, 1, Color.red, 100);


      If you do this:

      drawLineAbsolute( -40, v4p, 2 , v4p, PS_SOLID, 1, Color.red, null);

      it spits out an error message saying "parameter 8 is invalid".

      If you do this (Help says tagID is optional):

      drawLineAbsolute( -40, v4p, 2 , v4p, PS_SOLID, 1, Color.red);

      it spits out an error message saying parameter 8 is missing.

      Any ideas?

      Also, for some reason, I get some weird [Object Series] messages in the debug formula output window and that is what I am trying to figure out...
      Tex

      Comment


      • #4
        Tex50
        I am not positive but I think that the documentation may be incorrect and that the TagID is actually a required parameter.
        With regards to the [Series Object] message you need to specify the bar index if you want to retrieve a specific value from the series [for example mySeries.getValue(0)]
        Alex

        Comment

        Working...
        X