Compile error when starting new program
 Software and Programming Related   Started by Merijnn S   2015-09-11 11:30:31 -04:00   Comments: 4    Viewed: 454

  1. Merijnn S
    Merijnn S Member

    Postby merijn0301 » Wed Oct 29, 2014 10:24 am

    Hi,
    I'm programming an NXT brick with NXC / Brixcc.

    When I Compile and run an existing, previously written program all goes well. Perhaps a syntax-error or type-mismatch which is correctly shown.

    However, when I start a new program on "clean sheet" the compiler prompts a compile-error. Even when I copy-paste code from another program of which I am certain that it works, the compile-fail occurs.

    It doesn't say what goes wrong wether or not it is the code.

    When I Load a previously working program and I strip all the code and start writing new code all goes well.

    So, there is a problem when I start a "brand-new-program".

    Even a code like this never fails to ... well.. fail when written in a new "sheet" :

    task main()
    {
    TextOut(10, LCD_LINE4,"Whatever");"
    Wait(2000);
    }


    Can someone tell me what the problem is?
    Merijnn S, 2015-09-11 11:31:30 -04:00
  2. Mindsensors Support
    Mindsensors Support Member Richmond

    Postby admin » Wed Oct 29, 2014 10:33 am

    on the program you have mentioned, there is an extra quote at the end of the line 3.
    Which will cause a compiler error. Remove that quote and check.
    Mindsensors Support, 2015-09-11 11:32:09 -04:00
  3. Merijnn S
    Merijnn S Member

    Postby merijn0301 » Thu Oct 30, 2014 4:54 am

    You're right. I think it's a "typo" from typing some code in the post.
    This mistake, however, would cause an error-message of some sort.
    ...
    I tried it : With the extra quote the compile fails but promts a message regarding the extra quote.

    When I remove it ( the quote) the compile also fails but it doensn't tell what goes wrong and for what reason. It just prompts a messagebox telling me that the compile failed.

    When I open a previously written program, strip it and add this code : No problem.

    So, there must be something wrong when opening a "new" program.

    !!!!!! FOUND IT !!!!!!!!!!!! :o

    When I "Save-as" the program it works just fine.
    Merijnn S, 2015-09-11 11:32:18 -04:00
  4. Merijnn S
    Merijnn S Member

    Postby merijn0301 » Thu Oct 30, 2014 4:55 am

    !!!!!! FOUND IT !!!!!!!!!!!! :o

    When I "Save-as" the program before compiling it, it works just fine.
    Merijnn S, 2015-09-11 11:32:29 -04:00
  5. (You must log in or sign up to post here)

Log in | Sign up
Tems & Conditions!
Help!