Toggle navigation
Home
Forum
Files
MUDs
Paste
Wiki
Log in
MudBytes Community Forum
Coding and Design
/
does not give a valid preprocessing token
Reply
First
1
Last
11 Aug, 2009,
pentair
wrote in the 1st comment:
Votes:
0
messing around with gladiator pits and got this compile error:
error: pasting "CmdLeftHand" and "(" does not give a valid preprocessing token
its from this macro in commands.h:
#define CMD(f) void Cmd##f##(conn_t*pstConn,char*szCmd,char*szTxt)
referencing the command table:
CMD(LeftHand);
CMD(RightHand);
CMD(Feet);
CMD(Eyes);
CMD(Quit);
CMD(Shutdown);
CMD(Create);
CMD(Say);
etc, etc…
tried removing the ##'s and just using 1 # but still not working.
11 Aug, 2009,
David Haley
wrote in the 2nd comment:
Votes:
0
Try:
#define CMD(f) void Cmd##f (conn_t*pstConn,char*szCmd,char*szTxt)
The error is that parentheses cannot be part of an identifier; you want the left parenthesis to be separate from the identifier you are declaring.
11 Aug, 2009,
pentair
wrote in the 3rd comment:
Votes:
0
ahh! thanks that fixed it
Random Picks
ChicagoMUSH
Realms of Despair
CyberASSAULT
Top
Jump to
Bottom
0.0
/
3
error: pasting "CmdLeftHand" and "(" does not give a valid preprocessing token
its from this macro in commands.h:
#define CMD(f) void Cmd##f##(conn_t*pstConn,char*szCmd,char*szTxt)
referencing the command table:
CMD(LeftHand);
CMD(RightHand);
CMD(Feet);
CMD(Eyes);
CMD(Quit);
CMD(Shutdown);
CMD(Create);
CMD(Say);
etc, etc…
tried removing the ##'s and just using 1 # but still not working.