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!!!!!!
NXC Compiling errors
Re: NXC Compiling errors
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);
}
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.
Re: NXC Compiling errors
But i downt find them on my computers Keyboard!!!
Im going to get help finding it.
Im going to get help finding it.
-
- Posts: 290
- Joined: 03 Oct 2011, 00:06
- Location: Gallifrey
- Contact:
Re: NXC Compiling errors
On most keyboards, it's right under the "backspace" key.jonnxt wrote:But i downt find them on my computers Keyboard!!!
Im going to get help finding it.
A.K.A. NeXT-Generation.
"A kingdom of heaven for RobotC now has recursion!"
"A kingdom of heaven for RobotC now has recursion!"
Re: NXC Compiling errors
Look at the 2 keys just above and to the left of the 'Enter' key -
Press the 'Shift' key then one of these keys.
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.
-
- Posts: 358
- Joined: 01 Oct 2010, 06:37
- Location: Denmark
- Contact:
Re: NXC Compiling errors
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.)inxt-generation wrote:On most keyboards, it's right under the "backspace" key.
My blog: http://spillerrec.dk/category/lego/
RICcreator, an alternative to nxtRICeditV2: http://riccreator.sourceforge.net/
RICcreator, an alternative to nxtRICeditV2: http://riccreator.sourceforge.net/
Re: NXC Compiling errors
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.
Who is online
Users browsing this forum: No registered users and 10 guests