I am trying to add in eye colors in the creation process. They are based on 
race, so its a little more difficult.  I'm not that experienced yet, but I 
think this may work.
I did code some stuff up and it worked EXCEPT, it did not assign the correct 
eye color, in fact, it assigned the eye color that is defined as 0 in merc.h.
I did go into the player file, and change the value, from 0 to say, 2, and 
went back into the game. The change then DID reflect (2 was like green or 
something). But just during the roll up, no matter what eye color I choose, 
blue (value 0) is always given as their eye color.
I tried numerous things try to have them assign the correct color, I even 
took out the race specific eye color, just to see if I could assign something 
else. But, I only get blue as an eye color. This is based on my god code, and 
I just made if statements for the race. When I did add this in, it said 
"value" may be unintialized. I then changed all the value to value3 in the 
con_get_new_eye, and put a value3=0;, as the first thing in con_get_new_eye 
and it went away, and it still didn't change anything.
I've been trying to figure it out for about 3-4 hours and I've made no 
progress =/.
This is the code I had:

case CON_GET_NEW_EYE:
     if (is_number(argument))
     value3 = atoi(argument);
    else

       If (ch->race == race_lookup("human"))
    {
           send_to_desc("{YYour eye colors you can choose are:\n\r 
{x[1]Blue.\n\rWhat {RIS{c your the color of your eyes?{x ",d);
            
       switch ( value3 )
        {
        case 1: ch->eye =  EYE_BlUE;
                            break;
        
        default:
           send_to_desc("{cThat's not an eye color.\n\rWhat {RIS{c your the 
color of your eyes?{x ",d);
            return;
        }
       }
       else
       {
       {
           send_to_desc("{YYour eye colors you can choose are:\n\r{x 
[1]Red.\n\rWhat {RIS{c your the color of your eyes?{x ",d);
            return;
    }
        switch ( value3 )
        {
        case 1: ch->eye =  EYE_RED;
                            break;
        
        default:
           send_to_desc("{cThat's not an eye color.\n\rWhat {RIS{c your the 
color of your eyes?{x ",d);
             return;
      }
      }
            write_to_buffer( d, "\n\r\n\rWhat is your sex (M/F)?\n\r ",0);
            send_to_desc("\n\r{wYour choice or HELP for more info:{x\n\r",d);
            d->connected = CON_GET_NEW_SEX;
            break;
========================

Thank you for your help.


Reply via email to