[NXC] Unexplainable Error (at least for me)

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
deaeod
Posts: 2
Joined: 21 Mar 2012, 14:32

[NXC] Unexplainable Error (at least for me)

Post by deaeod »

These errors have stumped me for a day now and i cant seem to make any progress as to whats causing them. I know it has something to do with function declarations (commenting out the header includes in ChairSort.nxc, except for ChairSortHeader.nxc fixes the errors).

Any ideas?

Attached the code and an image of the errors.

EDIT: Fixed the descriptions of the attachments.
Attachments
ChairSort_Errors.zip
Image of the errors
(34.59 KiB) Downloaded 212 times
ChairSort_Code.zip
Code that causes the errors
(6.81 KiB) Downloaded 207 times
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: [NXC] Unexplainable Error (at least for me)

Post by HaWe »

I would first of all suggest to write 1 complete nxc file without any included header file.
To my experience it's nearly impossible to debug a NXC project consisting of a dozen files.

My suggestion:
Always start with 1 file.
If the program once will run like it should and you need to have some header files for other projects: make some headers of the most useful functions.
mcsummation
Posts: 220
Joined: 23 Jan 2012, 17:07
Location: Round Rock, TX

Re: [NXC] Unexplainable Error (at least for me)

Post by mcsummation »

ChairSortMotorControlHeader.nxc has the wrong #ifdef label. Therefore, when it gets to ChairSortMotorControl.nxc it doesn't include the actual definition of the routines.
deaeod
Posts: 2
Joined: 21 Mar 2012, 14:32

Re: [NXC] Unexplainable Error (at least for me)

Post by deaeod »

Well thats embarrassing. Thanks for catching that.
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests