[BUG] Medit save crasher

From: Cam Peter (merc_ca@yahoo.com)
Date: 06/02/01

Howdy all,

I try not to do this too often, but once again I'm
stumped on a bug of my own making.
I created damage resistance code based on the affect
list.  In fact, i essentially cloned the affect
structure assignment, only using a different structure
to allow chars to be resistant to different types of
damage in varying amounts.  A mob could be res fire
16%, or an item could give res slash 26%, etc.  The
code appears to work without any problems, and i've
tested it extensively.

I added the code to medit, and this too worked with no
problems.  However, before i imp'd this system, i had
an old resistance bitvector i'd been using, so
basically i took that out and recycled the old flag
names, etc.  I then went through my mob files (startup
mud with abt 25 original zones, no big deal) and
deleted as many references to the old resistances as i
could find.

Now, I have a crasher where a builder will go to save
his zone, and I'll get some crazy out of range values
for the resistance types (a normal type is between 24
and 54...the values i get are like...43534872034).
There are two things that are totally boggling me.
One is that this only ever occurs in one zone (zone
12), and has never happened in any other zone.  The
other is that it happens even when the mob with the
out of range resistance values didn't have its
resistances edited.  The process is:  builder edits
mob (any fields, generally, but it doesnt always
occur), builder saves internally with no problem,
builder saves to disk, at which point the code looks
up the string of the resistance type ("RES FIRE"), and

I've managed to block most of the occurences of the
crashing with simple checks for out of range values in
res type, but the numbers still crop up fairly
frequently, and crash from time to time...I am
clueless as to what could be creating these values,
because the builder can only select from a known set
of flags.

So, I'm appealing to someone who knows the
affect_modify, etc, code fairly well to drop me a
line, I'll send whatever code is requested (my
resistance handling and medit code is probably all
that's relevant).  Why is this only happening in one
zone?  Could it be a failure to remove some of the old
resistance flags, or simply applying too many
resistances to one mob?  Where are these values being

Thanks in advance,
Cam Peter

Out of doubt, out of dark to the days rising
I came singing in the sun, sword unsheathing.
To hope's end I rode, and to heart's breaking:
Now for wrath, now for ruin and a red nightfall!

Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/

   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |

This archive was generated by hypermail 2b30 : 12/05/01 PST