ACT_COMM.CPP(1189) : error C2043: illegal break
ACT_COMM.CPP(1191) : error C2046: illegal case
smaug.h line: 322
CON_PRESS_ENTER2, CON_REDO_CLASS, CON_REDO_RACE, CON_PRESS_ENTER, CON_MENU, CON_MENU2,
act_comm.cpp line: 1171 { the do_quit function }
** I added my code below this line: do_dismount (ch, "");
My code:
// Log Out Menu - Ryan Rae
CDescriptor *d;
ch = d->m_pCharacter;
d->WriteToBuffer("*** Welcome to: The Realm of Draenor ***\n\r\
\n\n\rLog Out Menu:\n\n\r\
0) Leave the Game\n\r\
1) Return to the Game\n\n\r\
2) Read the background story\n\r\
3) Read latest realm changes.\n\r\
4) Read the latest code changes.\n\n\r\
5) See the World Map.\n\r\
6) See a list of all the area's in the realm.\n\n\r\
Please select your choice: ", 0);
d->m_Connected = CON_MENU2;
return;
break;
case CON_MENU2:
switch ( argument [0] )
{
case '0':
d->WriteToBuffer( "Come back again.\n\r", 0 );
d->m_pCharacter->SetDesc (NULL);
RemoveCharacter (*d);
return;
break;
case '1':
return;
break;
case '2':
do_help( ch, "story" );
return;
break;
case '3':
do_help( ch, "motd" );
return;
break;
case '4':
do_help( ch, "code" );
return;
break;
case '5':
do_help( ch, "world" );
return;
break;
case '6':
do_help( ch, "prep" );
return;
break;
default:
d->WriteToBuffer("\nLog Out Menu:\n\n\r\
0) Leave the Game\n\r\
1) Return to the Game\n\n\r\
2) Read the background story\n\r\
3) Read latest realm changes.\n\r\
4) Read the latest code changes.\n\n\r\
5) See the World Map.\n\r\
6) See a list of all the area's in the realm.\n\n\r\
Please select your choice: ", 0);
return;
// End of New Log out Menu
switch( variable ) {
case value:
stuff…
break;
case value2:
stuff…
break;
default:
stuff…
break;
}
case '1':
return; <—
break;
case '2':
do_help( ch, "story" );
return; <—-
break;
case '3':
do_help( ch, "motd" );
return; <—-
break;
ACT_COMM.CPP(1189) : error C2043: illegal break
ACT_COMM.CPP(1191) : error C2046: illegal case
// New Login Menu - Ryan Rae
d->WriteToBuffer("*** Welcome to: The Realm of Draenor ***\n\r\
\n\n\rMain Menu:\n\n\r\
0) Leave the Game\n\r\
1) Enter the Game\n\r\
2) Read the background story\n\n\r\
3) Read latest realm changes.\n\r\
4) Read the latest code changes.\n\r\
5) Read the class information.\n\r\
6) Read the race information.\n\r\
7) Read the new player information.\n\n\r\
8) See the World Map.\n\r\
9) See a list of all the area's in the realm.\n\n\r\
Please select your choice: ", 0);
d->m_Connected = CON_MENU;
break;
case CON_MENU:
switch ( argument [0] )
{
case '0':
d->WriteToBuffer( "Come back again.\n\r", 0 );
/* clear descriptor pointer to get rid of bug message in log
* while noticing that you must set teh descriptor to NULL
* to do so. I would advise NOT to tamper with this function
* i.e. the close_socket function. It seems fine so no need to mess with it.
*/
d->m_pCharacter->SetDesc (NULL);
RemoveCharacter (*d);
return;
break;
case '1':
d->m_Connected = CON_PRESS_ENTER2;
break;
case '2':
do_help( ch, "story" );
return;
break;
case '3':
do_help( ch, "motd" );
return;
break;
case '4':
do_help( ch, "code" );
return;
break;
case '5':
do_help( ch, "class" );
return;
break;
case '6':
do_help( ch, "race" );
return;
break;
case '7':
do_help( ch, "nmotd" );
return;
break;
case '8':
do_help( ch, "world" );
return;
break;
case '9':
do_help( ch, "prep" );
return;
break;
default:
d->WriteToBuffer("\nMain Menu:\n\n\r\
0) Leave the Game\n\r\
1) Enter the Game\n\r\
2) Read the background story\n\n\r\
3) Read latest realm changes.\n\r\
4) Read the latest code changes.\n\r\
5) Read the class information.\n\r\
6) Read the race information.\n\r\
7) Read the new player information.\n\n\r\
8) See the World Map.\n\r\
9) See a list of all the area's in the realm.\n\n\r\
Please select your choice: ", 0);
return;
}
case CON_PRESS_ENTER2:
// End of New Login Menu
It is still giving me bugs in the compilor, but beyond that I am unsure I am going about this
in the correct way. So I am posting what I have here and hope someone can lend a hand.
Also another worry is the 2nd option, "returning to the game", I doubt I got that right.
File: act_comm.cpp Line: 1170 The do_quit function is where I plugged this code into.
Any help would be appreciated. I have no coder in my realm other then myself,
I can't seem to find one that is commited and does do any work.
The few I have had stuck around for 1 or 2 mods then that was it,
so if there are any out there that are not quitters and looking to help
out in that end that would be great. How ever, my main concern right
now, is this menu. You can reply to this, send me a message here, or you
can log into my realm and contact me there.
Telnet: aderon.zapto.org
Port: 23
Orrin edit: added code tags