Code : Remort system do_who

From: -¥=Çlärk Këñt=¥- (chewie@T-LINK.NET)
Date: 03/07/98


Hi all,
   I just recently implemented a remort system on my mud that's working
pretty good, and I also implemenetd it on my do who function, but I had to
also copy the remort classes to memory for whether or not the person is tri
classed, or double classed, which works fine and everything except I wanted
to add colors so it wouldn't look dull. When I did that, it would crash
just after I multied into my third multi class and typed who, and it
wouldn't crash until I typed who. The strange thing is when you type who,
it show what it's supposed to (the color and everything)
looks like this:
[   40  Wa|Cl|Ne   ] Ender the Knight (40) (Tro)  ,
And about 5 seconds after it displays it, the mud crashes. I've used both
escape sequences and my color code to do the color for the area where it
displays the class, and both crashes the mud.

here's the code:

char *showabbr(struct char_data *ch)
{

  class[0] = '\0';
  if (IS_FLAGGED(ch, MULTI_TH))
        strcpy(class, "Th");
  if (IS_FLAGGED(ch, MULTI_WA)) {
     if (strcmp(class,"") == 0)
        strcpy(class, "Wa");
      else
        strcat(class, "|Wa");
  }
  if (IS_FLAGGED(ch, MULTI_CL)) {
     if (strcmp(class,"") == 0)
        strcpy(class, "Cl");
      else
        strcat(class, "|Cl");
  }
  if (IS_FLAGGED(ch, MULTI_MU)) {
     if (strcmp(class,"") == 0)
        strcpy(class, "Mu");
      else
  }
  if (IS_FLAGGED(ch, MULTI_NE)) {
     if (strcmp(class,"") == 0)
        strcpy(class, "Ne");
      else
        strcat(class, "|Ne");
  }
  if (IS_FLAGGED(ch, MULTI_NI)) {
     if (strcmp(class,"") == 0)
        strcpy(class, "Ni");
      else
        strcat(class, "|Ni");
}
  if (IS_FLAGGED(ch, MULTI_PA)) {
     if (strcmp(class,"") == 0)
        strcpy(class, "Pa");
     else
        strcat(class, "|Pa");
  }
  if (IS_FLAGGED(ch, MULTI_DK)) {
     if (strcmp(class,"") == 0)
        strcpy(class, "Dk");
      else
        strcat(class, "|Dk");
}
  if (IS_FLAGGED(ch, MULTI_SA)) {
     if (strcmp(class,"") == 0)
        strcpy(class, "Sa");
     else
        strcat(class, "|Sa");
  }
  if (IS_FLAGGED(ch, MULTI_BE)) {
     if (strcmp(class,"") == 0)
        strcpy(class, "Be");
      else
        strcat(class, "|Be");
   }
   return class;
}

If anyone has any ideas why it crashes, please let me know =)

http://inda.mud.dynip.com
     +--------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html        |
     +------------------------------------------------------------- +


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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