Thread: Compile error
View Single Post
Old 07-20-2002, 09:02 AM   #27
melker
New Member
 
Join Date: Jul 2002
Posts: 20
melker is on a distinguished road
Send a message via AIM to melker
[code]

case CON_GET_ALIGNMENT;
{
//int Race;
switch ( argument[0] )
{
case '1'; ch->alignment = 1000; break;
case '2'; ch->alignment = 750; break;
case '3'; ch->alignment = 500; break;
case '4'; ch->alignment = 250; break;
case '5'; ch->alignment = 0; break;
case '6'; ch->alignment = -250; break;
case '7'; ch->alignment = -500; break;
case '8'; ch->alignment = -750; break;
case '9'; ch->alignment = -1000; break;
default;
send_to_char("Sorry thats not a valid alignment.\n\r\n\r",ch);
// show_align(ch);
return;
}

}
write_to_buffer(d,"\n\r",0);
for ( race = 0; race < MAX_PC_RACE; race++ ) {
do_help( ch, "NANNY_RACES" );
if (IS_GOOD(ch)) {
do_help(ch,"GOOD_RACES");
write_to_buffer(d,"\n\r\n\r",1);
send_to_char( "Enter the name of your desired race; ", ch );
// Uncomment these if you use NiMUD DC(d) = CON_CHAR_GEN_RACE;
d->connected = CON_GET_NEW_RACE;
break;
}
if (IS_NEUTRAL(ch)) {
do_help(ch,"NEUTRAL_RACES");
write_to_buffer(d,"\n\r\n\r",1);
send_to_char( "Enter the name of your desired race; ", ch );
// DC(d) = CON_CHAR_GEN_RACE;
d->connected = CON_GET_NEW_RACE;
break;
}
if (IS_EVIL(ch)) {
do_help(ch,"EVIL_RACES");
write_to_buffer(d,"\n\r\n\r",1);
send_to_char( "Enter the name of your desired race; ", ch );
// DC(d) = CON_CHAR_GEN_RACE;
d->connected = CON_GET_NEW_RACE;
break;
}
}
break;
case CON_GET_NEW_RACE;
one_argument(argument,arg);


if (!strcmp(arg,"help"))
{
argument = one_argument(argument,arg);
if (argument[0] == '\0')
do_help(ch,"race help");
else
do_help(ch,argument);
write_to_buffer(d,
"What is your race (help for more information)? ",0);
break;
}

race = race_lookup(argument);
if ((race == 0)
|| (!race_table[race].pc_race)
|| (IS_GOOD(ch) && !race_table[race].good)
|| (IS_NEUTRAL(ch) && !race_table[race].neutral)
|| (IS_EVIL(ch) && !race_table[race].evil))

ch->race = race;

for (i = 0; i < 5; i++)
{
if (pc_race_table[race].skills[i] == NULL)
break;
group_add(ch,pc_race_table[race].skills[i],FALSE);
}
/* add cost */
ch->pcdata->points = pc_race_table[race].points;
ch->size = pc_race_table[race].size;

write_to_buffer( d, "What is your sex (M/F/N)? ", 0 );
d->connected = CON_GET_NEW_SEX;
break;


case CON_GET_NEW_SEX;
switch ( argument[0] )
{
case 'm'; case 'M'; ch->sex = SEX_MALE;
ch->pcdata->true_sex = SEX_MALE;
break;
case 'f'; case 'F'; ch->sex = SEX_FEMALE;
ch->pcdata->true_sex = SEX_FEMALE;
break;
case 'n'; case 'N'; ch->sex = SEX_NEUTRAL;
ch->pcdata->true_sex = SEX_NEUTRAL;
break;
default;
write_to_buffer( d, "That's not a sex.\n\rWhat IS your sex? ", 0 );
return;
}
[/quote]

Forgot that part in the last message, this is of course in comm.c
melker is offline   Reply With Quote