Environment:
Microsoft Visual Studio 2008
Version 9.0.21022.8 RTM
Microsoft .NET Framework
Version 3.5 SP1
Installed Edition: Professional
Here is what I have:
Code:
#define SPELL_COST(spell, ch) \
switch((spell)) { \
case SPELLID_CLW: \
PLVL((ch)); \
break; \
} \
}
int a = SPELL_COST(SPELLID_CLW, ch);
I receive these errors upon compilation:
Quote:
c:\project\spell_verb_cure_light_wound.cpp(65) : error C2059: syntax error : 'switch'
c:\project\spell_verb_cure_light_wound.cpp(65) : error C2143: syntax error : missing ';' before '{'
c:\project\spell_verb_cure_light_wound.cpp(65) : error C2046: illegal case
c:\project\spell_verb_cure_light_wound.cpp(65) : error C2043: illegal break
c:\project\spell_verb_cure_light_wound.cpp(159) : error C2059: syntax error : '}'
c:\project\spell_verb_cure_light_wound.cpp(159) : error C2143: syntax error : missing ';' before '}'
c:\project\spell_verb_cure_light_wound.cpp(159) : error C2059: syntax error : '}'
What am I doing wrong?