Ok, everything was going great, until I added in the rather simple (or so I
thought) ansi login/greeting to my nanny function.

Right now, I can log in as existing characters with the Do You want ANSI
prompt just fine, but when I attempt to create a new character, select my
race, and then when it prompts for the sex of the character in GET_NEW_SEX
it crashes the mud.

I'm really not sure why, as I didnt change anything in the process of adding
in the ansi login to the CON GET NEW RACE or CON GET NEW SEX.

Here is my code line 2079 - 2132:

 /* 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)? ", 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;
    default:
        write_to_buffer( d, "That's not a sex.\n\rWhat IS your sex? ", 0 );
        return;
    }

    /* Class Listing Menu fiz */
    sprintf(buf, "%s\n\r------------------------------[",C_WHITE);
    send_to_char(buf,ch);
    sprintf(buf, "%s Classes Available ",C_B_WHITE);
    send_to_char(buf,ch);
    sprintf(buf, "%s]-----------------------------\n\r\n\r",C_WHITE);
    send_to_char(buf,ch);
    do_function(ch, &do_help,"cmenu");
    sprintf(buf,
"%s-------------------------------------------------------------------------
-------\n\r",C_WHITE);
    send_to_char(buf,ch);
    /* Reset Color (green) fiz */
    sprintf(buf, "%s",CLEAR);
    send_to_char(buf,ch);

    strcpy( buf, "Select a class [" );
    for ( iClass = 0; iClass < MAX_CLASS; iClass++ )
    {
        if (!class_table[iClass].remort_class ||
           (class_table[iClass].remort_class && IS_SET(ch->act,PLR_REMORT)))
        {
        if ( iClass > 0 )
            strcat( buf, " " );
        strcat( buf, class_table[iClass].name );
        }
    }
    strcat( buf, "]: " );
    write_to_buffer( d, buf, 0 );
    d->connected = CON_GET_NEW_CLASS;
    break;

    case CON_GET_NEW_CLASS:



Is there anything visibily incorrect in the above lines? or could it be due
to something else.  It compiles fine, so I'm kinda lost.  Any help would be
appreciated.

Thanks
-Zeio


Reply via email to