Re: CODE: race

From: Robert Moon (
Date: 08/14/99

At 09:01 PM 6/1/99 +0000, you wrote:
>First I added to the set_fields structure a race field that is basically a
>copy of class field. Making sure that it at the end but not before the last
>field. So it is now number 52.
>   { "race",       LVL_GRGOD,  BOTH,   MISC },
>Then I went down and added a case 52. That is a copy of the class one
>changed to race.

One possibility as to the cause of the bug is that the case statement
should be 51 and not 52 if this is the very first addition you have made to
the do_set procedure, since stock CircleMUD bpl15 stops at case 50 with
"weight".  Of course, if you have added one previous addition to the do_set
procedure, then 52 is the appropriate case number.  Another possibility
along the same vein is if you deleted one of the members of the structure
and forgot to renumber every respective case statement thereafter.  For
instance, let's say that you do not use exceptional strength in your MUD
and deleted the
    { "stradd",         LVL_GRGOD,      BOTH,   NUMBER },
line from the structure.  If you did not renumber (decrement) every case
statement starting with case 13 (since stradd is set in case 12), not only
would there would be NO case 52, you would be setting the wrong values for
most of the other commands.

Another possibility is that you forgot the "break;" statement in case 52 in
your actual code.  (I see that you included it in your post, but I wasn't
sure if that was a direct cut-and-paste, or you manually typed it into your
E-Mail program.)  If you did, in fact, forget the break statement for case
52, the race of the target would get properly set, but you would also see
the default message of "Can't set that", since the program continues to
execute all commands of a switch routine until it hits a "break."

Those are the obvious possibilities to me at first glance.  Otherwise, I
can't see where the bug might come from.


ICQ:  14598527

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

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