NXC Compiling errors

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
jonnxt
Posts: 14
Joined: 27 Mar 2012, 11:12

NXC Compiling errors

Post 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!!!!!!
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: NXC Compiling errors

Post 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);
}
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
jonnxt
Posts: 14
Joined: 27 Mar 2012, 11:12

Re: NXC Compiling errors

Post by jonnxt »

But i downt find them on my computers Keyboard!!!
Im going to get help finding it.
inxt-generation
Posts: 290
Joined: 03 Oct 2011, 00:06
Location: Gallifrey
Contact:

Re: NXC Compiling errors

Post 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.
A.K.A. NeXT-Generation.
"A kingdom of heaven for RobotC now has recursion!"
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: NXC Compiling errors

Post 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.
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
spillerrec
Posts: 358
Joined: 01 Oct 2010, 06:37
Location: Denmark
Contact:

Re: NXC Compiling errors

Post 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.)
My blog: http://spillerrec.dk/category/lego/
RICcreator, an alternative to nxtRICeditV2: http://riccreator.sourceforge.net/
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: NXC Compiling errors

Post by h-g-t »

If you still can't find them,cut and paste them from the program I posted above.
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 10 guests