[CODE] [LONG] [NEW SCORE] [PROBLEM?]

From: Ray Campbell (goalie19@IDT.NET)
Date: 02/18/97


Here is my new score code:
NOTE: if someone could just please tell me where I went wrong *laugh*,
This compiles fine, but
when I type score in the MUD All I get is this:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
You are standing.

What am I missing?
Any help is appreciated, Thank you.



ACMD(do_score)
{
struct time_info_data real_time_passed(time_t t2, time_t t1);
sprintf(buf,
"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\r\n");
sprintf(buf, "%s                      Current statistics:\r\n",buf);
sprintf(buf,
"%s-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\r\n",buf);
sprintf(buf, "%sName: %10s          |Hitpoints: &r%d&w(&b%d&w)\r\n",
buf,
        GET_NAME(ch), GET_HIT(ch), GET_MAX_HIT(ch));
  sprintf(buf, "%sTitle: %s           |Mana:  &r%d&w(&b%d&w)\r\n", buf,
        GET_TITLE(ch), GET_MANA(ch), GET_MAX_MANA(ch));
  sprintf(buf, "%sAge: %d             |Movement: &r%d&w(&b%d&w)\r\n",
buf,
        GET_AGE(ch), GET_MOVE(ch), GET_MAX_MOVE(ch));
 sprintf(buf, "%sSex: %d             |Hitroll: &y%d&w\r\n", buf,
        GET_SEX(ch), GET_HITROLL(ch));
  sprintf(buf, "%sWeight: %d          |Damageroll: &y%d&w\r\n", buf,
        GET_WEIGHT(ch), GET_DAMROLL(ch));
sprintf(buf, "%sAlignment: &g%d&w   |Armor Class: &g%d/10&w\r\n", buf,
        GET_AC(ch), GET_ALIGNMENT(ch));
  sprintf(buf, "%sLevel: %d           |Gold on hand: %d\r\n", buf,
        GET_LEVEL(ch), GET_GOLD(ch));
  if (!IS_NPC(ch)) {
    if (GET_LEVEL(ch) < LVL_IMMORT)
  sprintf(buf, "%sTotal Exp: %d       |Exp To Level: %d\r\n", buf,
      GET_EXP(ch), (titles[(int) GET_CLASS(ch)][GET_LEVEL(ch) + 1].exp)
- GET_EXP(ch));
  sprintf(buf,
"%s-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\r\n",buf);
  sprintf(buf, "                         Your attributes:\r\n");
  sprintf(buf, "%sStr: [&r%d&w], Int: [&r%d&w], Wis: [&r%d&w], Dex:
[&r%d&w], Con:[&r%d&w]
  Cha:[&r%dw]\r\n", buf, /* Note, move this up to the previous line, my
mail editor won't fit it */
        GET_STR(ch), GET_INT(ch), GET_WIS(ch), GET_DEX(ch), GET_CON(ch),
GET_CHA(ch));
  sprintf(buf,
"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\r\n");
};
 send_to_char(buf, ch);
  switch (GET_POS(ch)) {
  case POS_DEAD:
    strcat(buf, "You are DEAD!\r\n");
    break;
  case POS_MORTALLYW:
    strcat(buf, "You are mortally wounded!  You should seek help!\r\n");
    break;
  case POS_INCAP:
    strcat(buf, "You are incapacitated, slowly fading away...\r\n");
    break;
  case POS_STUNNED:
    strcat(buf, "You are stunned!  You can't move!\r\n");
    break;
  case POS_SLEEPING:
    strcat(buf, "You are sleeping.\r\n");
    break;
  case POS_RESTING:
    strcat(buf, "You are resting.\r\n");
    break;
  case POS_SITTING:
    strcat(buf, "You are sitting.\r\n");
    break;
  case POS_FIGHTING:
    if (FIGHTING(ch))
      sprintf(buf, "%sYou are fighting %s.\r\n", buf, PERS(FIGHTING(ch),
ch));
    else
      strcat(buf, "You are fighting thin air.\r\n");
    break;
  case POS_STANDING:
    strcat(buf, "You are standing.\r\n");
    break;
  default:
    strcat(buf, "You are floating.\r\n");
    break;
  }
  if (GET_COND(ch, DRUNK) > 10)
    strcat(buf, "You are intoxicated.\r\n");

  if (GET_COND(ch, FULL) == 0)
    strcat(buf, "You are hungry.\r\n");

  if (GET_COND(ch, THIRST) == 0)
    strcat(buf, "You are thirsty.\r\n");

  if (IS_AFFECTED(ch, AFF_BLIND))
    strcat(buf, "You have been blinded!\r\n");

  if (IS_AFFECTED(ch, AFF_INVISIBLE))
    strcat(buf, "You are invisible.\r\n");

  if (IS_AFFECTED(ch, AFF_DETECT_INVIS))
    strcat(buf, "You are sensitive to the presence of invisible
things.\r\n");

  if (IS_AFFECTED(ch, AFF_SANCTUARY))
    strcat(buf, "You are protected by Sanctuary.\r\n");

  if (IS_AFFECTED(ch, AFF_POISON))

    strcat(buf, "You are poisoned!\r\n");

  if (IS_AFFECTED(ch, AFF_CHARM))
    strcat(buf, "You have been charmed!\r\n");

  if (affected_by_spell(ch, AFF_SHIELD))
    strcat(buf, "You are surrounded by a protective shield.\r\n");

  if (affected_by_spell(ch, SPELL_ARMOR))
    strcat(buf, "You feel protected.\r\n");

  if (IS_AFFECTED(ch, AFF_INFRAVISION))
    strcat(buf, "Your eyes are glowing red.\r\n");

  if (PRF_FLAGGED(ch, PRF_SUMMONABLE))
    strcat(buf, "You are summonable by other players.\r\n");

  send_to_char(buf, ch);
}
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
|    Or send 'info circle' to majordomo@cspo.queensu.ca     |
+-----------------------------------------------------------+



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