Jump to content
  • 0

switch c++


Minion

Question

case WEAPON_SWORD:
case COSTUME_SWORD:
    dwMode = MOTION_MODE_ONEHAND_SWORD;
    break;
 
char.cpp:2797: error: duplicate case value
char.cpp:2785: error: previously used here
 
???

 

Link to comment
  • Answers 4
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

4 answers to this question

Recommended Posts

  • 0

 

case WEAPON_SWORD:
case COSTUME_SWORD:
    dwMode = MOTION_MODE_ONEHAND_SWORD;
    break;
 
char.cpp:2797: error: duplicate case value
char.cpp:2785: error: previously used here
 
???

 

case WEAPON_SWORD:
    break;
case COSTUME_SWORD:
    dwMode = MOTION_MODE_ONEHAND_SWORD;
    break;
Link to comment
  • 0

char.cpp:2797: error: duplicate case value
char.cpp:2785: error: previously used here
 
So, you better give us the whole switch statement. Otherwise nobody can help you. Duplicate case value should explain everything. But it's not only these two lines. Look at the error code. Line 2797 and 2785 are affected. So guess what? We need the whole switch statement.

what would you do in a battle of survival?

It's coming soon

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.