Announcement

Collapse
No announcement yet.

Workshop 4 ???

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

  • Workshop 4 ???

    The "process" gifs an error?

    Warning: constant is truncated to 16 bit, value was 115200 (0x0001C200) (line 16 file:temp_III.4Dg)
    Error: 'process' not found (line 21 file:temp_III.4Dg)
    Error: context error for unknown 'process' (line 21 file:temp_III.4Dg)

    this is from an example from the help PDF
    can some one explain wats wrong.....

    #platform "GOLDELOX"
    #inherit "4DGL_16bitColours.fnc"
    #inherit "VisualConst.inc"
    #inherit "temp_IIIConst.inc"
    #inherit "LedDigitsDisplayGoldelox.inc"
    func main()
    // Uncomment the following if uSD images, fonts or strings used.

    print("Starting\n") ;
    while(!media_Init())
    putstr("Drive not mounted...");
    pause(200);
    gfx_Cls();
    pause(200);
    wend
    setbaud(115200);

    var command;
    command := serin();
    if (command >= 0)
    process(command); <<<<<<<<<<<<<<<<<<<<<???????????????
    endif
    repeat

    // Customdigits1 1.1 generated 21-11-2015 15:06:24
    media_SetAdd(iCustomdigits1H, iCustomdigits1L) ; // point to the Customdigits1 image
    media_Image(60, 56) ; // show all digits at 0, only do this once
    ledDigitsDisplay(command, iiCustomdigits1H, iiCustomdigits1L, 60, 56, 4, 1, 9, 0) ;

    forever
    endfunc


  • #2
    The warning is about this
    Code:
    setbaud(115200);
    That's not how you use setbaud, I think you meant
    Code:
    setbaud(BAUD_115200);
    As for the "Error: 'process' not found (line 21 file:temp_III.4Dg)" issue, well that looks like something you typed in, you are trying to call a function called process, but the compiler is saying it doesn't exist.
    Mark

    Comment


    • #3
      Sorry but this will also not working, same error.
      can you put a working example hire please...

      Comment


      • #4
        It's a bit unclear what you are after an example of, the error is what you have coded and it is so simplistic all you need to do is write the process function to fix it. The warning goes away when it is fixed as I described.
        Mark

        Comment

        Working...
        X