[NEWBIE][HELP & QUESTIONS] Funny Error with Easycolor 2.2

From: Owen Brodal-Robertson (firemage@ZIP.COM.AU)
Date: 05/03/98


Ok, I've got a couple of questions that I'd like to ask.
My knowledge of C is fairly fluent, but I don't have an awful lot of
experience in MUDs code.

Firstly I need some help in debugging the following problem:

I downloaded the command 'attributes' from the ftp site
{ACMD(do_attributes)}, and added it to my mud, then I saw the easy_color
patch, and installed that thinking how pretty I could get things to look.
After a slight modification on the do_attributes (basically removing the
current colors, and adding my own), I used the command.
And this is what I got:

hahactct a ariritetefofoFiFiMaMa

Level: [34]   Class: [ Wa]
Age:   [17] yrs / [4] mths
Height:[174] inches
Weight:[144] lbs
Str:   [25]       Int: [25]       Wis: [25]
Dex:   [25]       Con: [25]       Cha: [25]
Armor Class: [100]
Hitroll:     [0]   Damroll: [0]
Alignment:   [1000]
Saving Throws: PAR[[0]]  ROD[[0]]  PET[[0]]
               BRE[[0]]  SPE[[0]]

Now I don't know how it'll look on your e-mail prog (looks kinda unco on
mine), but everything there except for the
Line 'Character Attributes For FireMage' (which is that bunch of repeated
chars). Works fine.
The color displays correctly, and I don't have any Idea why this happens,
even when I add a new line above the first one which displays the character
name it gives the same output.

Here's my do_attributes code:

ACMD(do_attributes)
{
  sprintf(buf, "&n                 Character attributes for %s\r\n",
GET_NAME(ch));
  sprintf(buf, "&w%s\r\nLevel: [&r%d&w]   Class: [&r%3s&w]\r\n", buf,
GET_LEVEL(ch),
                CLASS_ABBR(ch));
  sprintf(buf, "%sAge:   [&r%d&w] yrs / [&r%d&w] mths\r\n"
               "Height:[&r%d&w] inches\r\n"
               "Weight:[&r%d&w] lbs\r\n", buf,
               age(ch).year, age(ch).month, GET_HEIGHT(ch),
GET_WEIGHT(ch));
  if ((GET_CLASS(ch) == CLASS_WARRIOR) && GET_STR(ch) == 18)
    sprintf(buf, "%sStr:   [&r%d&w/&r%3d&w]   Int: [&r%d&w]       Wis:
[&r%d&w]\r\n"
                 "Dex:   [&r%d&w]       Con: [&r%d&w]       Cha:
[&r%d&w]\r\n", buf,
                 GET_STR(ch), GET_ADD(ch), GET_INT(ch), GET_WIS(ch),
                 GET_DEX(ch), GET_CON(ch), GET_CHA(ch));
  else
    sprintf(buf, "%sStr:   [&r%d&w]       Int: [&r%d&w]       Wis:
[&r%d&w]\r\n"
                 "Dex:   [&r%d&w]       Con: [&r%d&w]       Cha:
[&r%d&w]\r\n", buf,
                 GET_STR(ch), GET_INT(ch), GET_WIS(ch), GET_DEX(ch),
                 GET_CON(ch), GET_CHA(ch));
  sprintf(buf, "%sArmor Class: [&r%d&w]\r\n", buf, GET_AC(ch));
  sprintf(buf, "%sHitroll:     [&r%d&w]   Damroll: [&r%d&w]\r\n", buf,
(ch)->points.hitroll,
               (ch)->points.damroll);
  sprintf(buf, "%sAlignment:   [&r%d&w]\r\n", buf, GET_ALIGNMENT(ch));
  sprintf(buf, "%sSaving Throws: PAR[[&r%d&w]]  ROD[[&r%d&w]]
 PET[[&r%d&w]]\r\n"
               "               BRE[[&r%d&w]]  SPE[[&r%d&w]]\r\n&n", buf,
               GET_SAVE(ch, 0), GET_SAVE(ch, 1), GET_SAVE(ch, 2),
GET_SAVE(ch, 3),
               GET_SAVE(ch, 4));
  send_to_char(buf, ch);
}

I think it's got something to do with the proc_color procedure, but, not
having reviewed the code intensely I can't tell.
Anyone seen this problem before?

My other question was, I'd like to implement justice code in my mud
(similar to the DURIS justice system, if anyone has seen it).
What I was wondering is how could I implement this? I'd need a flag on my
rooms/mobs to check if they were witnesses, and they'd have to walk to a
room, and report the crime they saw. Has anyone done this with Circle? Or
could anyone tell me how?

Thanks for a reply. (Sorry about the size of the message).

FireMage. IMP of the Elemental Plains MUD.


     +------------------------------------------------------------+
     | 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