I think that the compiler is complaining that it doesn't know what NumOfPlayers is, or believes it to be something other than a variable. Likewise in your argument list, one of them is not the type of thing it ought to be?
This can occur due to a syntax error (such as forgetting a semi-colon, or mis-matched braces, etc.) in some line above line 265.
It can also occur, amazingly, if you have whitespace other than spaces, tabs, and CR and LF in the lines, and sometimes if you don't put spaces between the "switch" and "(" ---Ithink, but I am not sure. GCC shouldn't have these problems...
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229
gcc -E file.c > file.i
Arrange for the offending file to be compiled like that. What you'll see in the .i file is your source code AFTER the pre-processor has done it's work. For one thing, it will be much longer because all the include files will be expanded. Another is all #defines will have been expanded.
You may find that you have something like 3 = DialogBox(g_hInst,MAKEINTRESOURCE(IDD_PLAYERCOUNT), hwnd, DlgProc);
which would indicate that the variable name you're interested in is somehow a macro. It might not help that much, but seeing exactly what the compiler sees is a start. (NumOfPlayers) = DialogBox(g_hInst,MAKEINTRESOURCE(IDD_PLAYERCOUNT), hwnd, DlgProc);
Should prevent the macro being expanded, if indeed it is a macro.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
> IDD_PLAYERCOUNT DIALOG, 0, 0, 145, 60
I'm not that familiar with .rc syntax, but shouldn't there be a comma between DIALOG and the zero (shown in red)?
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
No, but I think there should be a comma at the end of line 22.
I've never directly made dialogues in an RC file though... If I'm wrong about line 22 I'll have to look it up.
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229