Major system error
harry_aller
Posts: 20
Good evening or morning depending on when you read this...
I'm getting a "C10580: Internal Error: Major system error occurred during code generation" when compiling. I've determined it to a switch case that I added. I comment the particular case out and it is happy.
Anyone see problems with this code within a function?
cTEMP_GAME is declared as: CHAR cTEMP_GAME[10]
Thanks for the help in advance!
I'm getting a "C10580: Internal Error: Major system error occurred during code generation" when compiling. I've determined it to a switch case that I added. I comment the particular case out and it is happy.
Anyone see problems with this code within a function?
cTEMP_GAME is declared as: CHAR cTEMP_GAME[10]
SWITCH (cTEMP_GAME) { CASE 'FO': SEND_COMMAND dvTP_SCORES,"'^BMF-',ITOA(380+nMENU_COUNT),',0,%TFinal-OT'" }
Thanks for the help in advance!
0
Comments
Paul
1) A single character CASE above a multi character CASE (which I assume is your issue.) So if you have something like this:
You’ll need to change it to this:
2) Two functions with the same name.
If anyone knows of any other ways to cause a major system error, this would be a good thread to post it in.
You nailed it! Who would of thought??? Putting the multi-character cases first...
Is there a reason behind that or is it just a bug in NetLinx Studio?
Thanks for the help. It's compiling now!
I don't remember the specific error but "Major system error occurred during code generation" sounds like the error I've seen was cause by a copy/paste error. The End of Line characters (CR LF) only had a CR or LF instead of both. To find it select the "Show End of Line" option in NetLinx Studio and looked for the bad EOL. Hope that helps someone.
Anyone know where one can set this "show end of line" option?
Never mind. I used Sublime text to check the line endings. They were fine.
But I got rid of this error, somehow, by rearranging definitions and trying this & that. No idea of the cause. I had no SWITCH in the module.
Also happens when you have two function definitions with the same name. Simple copy/paste mistake. Weird that the compiler isn't smarter about that.
The setting for 'show end of line' is in menu: 'edit ' > 'advanced'.
It's been a while since I've done some NetLinx code and I ran into this. I chased my tail for a good 20 minutes.
I've just started learning to program in Netlinx, and the first code I knocked up and compiled resulted in this error, first time round.
I was using Netlinx Studio on Windows 10, through VirtualBox on a Mac. But when I transferred to a PC, running Windows 10, it compiled no problem. Same code, no changes.
This is one of the more frustrating compiler error messages. No guidance to a line number or further descriptive messaging to point you into a direction. I encountered one recently when I inadvertently pasted a function declaration twice. In general, it is code related and block comment/uncomment is typically how I try to chase these issues down.