[Circle] NEWBIE NEEDS HELP AGAIN! (*sigh*)

From: Cyber Reaper (Reaper@cyber.reno.nv.us)
Date: 07/31/96


ok, I have added this code and it is causing a memory fault. can someone
point out the error to me, I cannot find it, I assume it has to do with the
(FIGHTING(d->character)) but cant seem to find it.

---snip---
 if (GET_POS(d->character) == 7)
       sprintf(prompt, "%s%sHIS COND:%s", prompt, CCGRN(d->character, C_NRM),
       CCNRM(d->character, C_NRM));

 if (GET_MAX_HIT(FGHTING(d->character)) > 0)
    percent = (100 * GET_HIT(FGHTING(d->character))) /
GET_MAX_HIT(d->character);
  else
    percent = -1;               /* How could MAX_HIT be < 1?? */

        if (GET_POS(d->character) == 7)
  if (percent >= 100)
     sprintf(prompt, "%s%sPERFECT%s|", prompt, CCGRN(d->character, C_NRM),
             CCNRM(d->character, C_NRM));
  else if (percent >= 90)
     sprintf(prompt, "%s%sGREAT%s|", prompt, CCBLU(d->character, C_NRM),
 CCNRM(d->character, C_NRM));
  else if (percent >= 75)
     sprintf(prompt, "%s%sFAIR%s|", prompt, CCWHT(d->character, C_NRM),
             CCNRM(d->character, C_NRM));
  else if (percent >= 50)
     sprintf(prompt, "%s%sBAD%s|", prompt, CCYEL(d->character, C_NRM),
             CCNRM(d->character, C_NRM));
  else if (percent >= 30)
     sprintf(prompt, "%s%sVERY BAD%s|", prompt, CCCYN(d->character, C_NRM),
             CCNRM(d->character, C_NRM));
  else if (percent >= 15)
      sprintf(prompt, "%s%sAWFULL%s|", prompt, CCRED(d->character, C_NRM),
             CCNRM(d->character, C_NRM));
  else if (percent >= 0)
    sprintf(prompt, "%s%sDYING%s|", prompt, CCMAG(d->character, C_NRM),
             CCNRM(d->character, C_NRM));
 ---snip---

thank you for any help.

Cyber Reaper
Realms of Reality
***UNDER CONSTRUCTION!!!***
telnet://login.greatbasin.net 4000

+-----------------------------------------------------------+
| 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/07/00 PST