[Circle] [CODE] Remort Help

From: Leonard Burns IV (lburns@continet.com)
Date: 11/23/96


I'm trying to make a function that allows the char to add 5 points to
their existing stats, when they remort. I'm having some problems, when I
run it, it only displays the stats and returns to the prompt, it never
asks for input. Here is the function, can anyone point out what I need
to change, or what I've done wrong? Thanks.

/***** START OF CODE *****/
void remort_stat(struct char_data * ch)
{
  char arg;

  send_to_char("\r\nCongratulations on your remort!\r\n", ch);
  send_to_char("To add to your stats simply type the letter of the
stat.\r\n", ch);
  send_to_char("There is no changing the stat once you add to it.\r\n",
ch);
  
  sprintf(buf, " (S)tr: %d/%d\r\n (I)nt: %d\r\n (W)is: %d\r\n (D)ex:
%d\r\n (C)on:           %d\r\n C(h)a: %d\r\n", ch->real_abils.str,
ch->real_abils.str_add,                  ch->real_abils.intel,
ch->real_abils.wis, ch->real_abils.dex,                     
ch->real_abils.con, ch->real_abils.cha);
  send_to_char(buf, ch);
  switch(arg) {
  case 's':
  case 'S':
    if (ch->real_abils.str >= 25)
      break;
      ch->real_abils.str = ch->real_abils.str + 1;
      return;
  case 'i':
  case 'I':
    if (ch->real_abils.intel >= 25)
      break;
      ch->real_abils.intel = ch->real_abils.intel + 1;
      return;
  case 'w':
  case 'W':
    if (ch->real_abils.wis >= 25)
      break;
      ch->real_abils.wis = ch->real_abils.wis + 1;
      return;
  case 'd':
  case 'D':
    if (ch->real_abils.dex >= 25)
      break;
      ch->real_abils.dex = ch->real_abils.dex + 1;
      return;
  case 'c':
  case 'C':
    if (ch->real_abils.con >= 25)
      break;
      ch->real_abils.con = ch->real_abils.con + 1;
      return;
  case 'h':
  case 'H':
    if (ch->real_abils.cha >= 25)
      break;
      ch->real_abils.cha = ch->real_abils.cha + 1;
      return;
  default: 
 /* Just want to show stats on default, not whole thing, not sure how to
*/
      remort_stat(ch);
      return;
 }
}

/***** END OF CODE *****/
-- 
Leonard Burns IV
lburns@continet.com
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST