Announcement

Collapse
No announcement yet.

Problem with function

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

  • Problem with function

    Hi guys, i have a problem with a Display diablo 43DT.
    My display after 8 touches it resets, and start with the first form.

    Code:
    //global -----------------------------------------------------------
    var page:= 1;

    //main -------------------------------------------------------------
    func main()

    repeat
    if (page == 1)
    Form1();
    else if (page == 2)
    Form2();
    else if (page == 3)
    Form3();
    else if (page == 4)
    Form4();
    endif
    forever


    endfunc
    //////////////////////////////////////////////////////////////////////////////////////////////////////////

    func Form1() -----------------------------------------------------------

    //code
    page := page +1;
    return;

    endfunc
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////
    func Form2() -------------------------------------------------------------------

    repeat

    //code
    if(touch_Get(TOUCH_STATUTS) == TOUCH_PRESSED)
    . . .. ..
    page := page +1;
    return;
    endif
    forever
    endfunc
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////

    Form3() and Form4() are egual to Form2()

    What is the problem? I use "return" in every Form() for reset the memory.
    Times ago, the display had given me an error: "Stack overflow", but now there aren't errors.
    The display restart to the main().
    I don't know what i have to do…

    Thank you for your time.
    Eros

  • #2
    Hi Eros,

    I tried replicating the issue you mentioned, however, I didn’t encounter any similar issues on my end.
    It would be helpful if you can send your project. If your project is too big or has some parts that you mind sharing in the forum, please try minimizing the code while retaining the issue you mentioned before sending the modified project.

    However, if removing the parts you mind sharing also removes the issue, you may also send your complete project through a support ticket: https://www.4dsystems.com.au/support

    Best Regards,
    Pearl
    Pearl

    Comment


    • #3
      Thank you Pearl for your time, but i will send the project in the link: https://www.4dsystems.com.au/support
      because its very long.

      Thank you

      Eros

      Comment

      Working...
      X