Page 1 of 1

NXC Compiling errors

Posted: 30 May 2012, 09:46
by jonnxt
Today i downloaded NXC. I have watched some vedeo tutorials, but i have a problem: :(

This is the code that he teached me, and when i press the compile button it seas:
line 3 Error: Declaration syntax error
line 3 Error: ';' is expected
line 4 Error: ';' is expected
line 5 Error: ';' is expected
line 6 Error: ';' is expected
line 7 Error: ';' is expected
line 8 Error: ';' is expected

task main ()
(
OnFwd(OUT_A, 30);
OnFwd(OUT_C, 30);
Wait(4000);
OnRev(OUT_AC, 30);
Wait(4000);
Off(OUT_AC);
)

When i try to expriment with my own programs the same happens!!!!!!

Re: NXC Compiling errors

Posted: 30 May 2012, 11:55
by h-g-t
You need to use 'curly brackets' -

task main ()
{
OnFwd(OUT_A, 30);
OnFwd(OUT_C, 30);
Wait(4000);
OnRev(OUT_AC, 30);
Wait(4000);
Off(OUT_AC);
}

Re: NXC Compiling errors

Posted: 30 May 2012, 19:00
by jonnxt
But i downt find them on my computers Keyboard!!!
Im going to get help finding it.

Re: NXC Compiling errors

Posted: 30 May 2012, 19:04
by inxt-generation
jonnxt wrote:But i downt find them on my computers Keyboard!!!
Im going to get help finding it.
On most keyboards, it's right under the "backspace" key.

Re: NXC Compiling errors

Posted: 30 May 2012, 19:32
by h-g-t
Look at the 2 keys just above and to the left of the 'Enter' key -

Image

Press the 'Shift' key then one of these keys.

Re: NXC Compiling errors

Posted: 30 May 2012, 19:39
by spillerrec
inxt-generation wrote:On most keyboards, it's right under the "backspace" key.
Depends very much on what country you are from. On Danish keyboards for example you have to press Ctrl+Alt+7 and Ctrl+Alt+0 for the closing bracket. (In return for their terrible position on the keyboard they are named after a beer.)

Re: NXC Compiling errors

Posted: 31 May 2012, 02:38
by h-g-t
If you still can't find them,cut and paste them from the program I posted above.