MobProg Bug

From: Akuma/Chris Baggett/DOOMer (doomer@BAYOU.COM)
Date: 10/21/97


check THIS out,
i was going through the mobprog code (trying to finally understand it and
use a few macros so i know what's going on)
anyway, i was changing all the mob_index[mob->nr].virtual to
GET_MOB_VNUM(mob).

well, i got down to this piece of code and noticed something strange
(it would crash my mud upon a death if you used $t)
*************************
        case 'n': if (actor)       // this is all correct down to case 't'
                  {
                    if IS_NPC(actor)  // i just wanted you to see the
differences here
                    {
                      lhsvl = mob_index[actor->nr].virtual;
                      rhsvl = atoi(val);
                      return mprog_veval(lhsvl, opr, rhsvl);
                    }
                  }
                  else
                    return -1;
        case 't': if (vict)
                  {
                    if IS_NPC(actor)   // and HERE's the problem i see.
                    {
                      lhsvl = mob_index[vict->nr].virtual;
*****************
it checks to see if vict is NULL, if not, then
is ACTOR an NPC? blah.  that sux
you might wanna change that line to

if IS_NPC(vict)

it's in the ifchck section, search for  "number" (with the quotes)
and you should be able to find it in the case 't':  section
this is mainly for ppl with mobprogs,and mobprogs in oasis.

Code On
Akuma the Raging Coder

  +------------------------------------------------------------+
  | "The poets talk about love, but what I talk about is DOOM, |
  |      because in the end, DOOM is all that counts." -       |
  |   Alex Machine/George Stark/Stephen King, The Dark Half    |
  |        "Nothing is IMPOSSIBLE, Just IMPROBABLE"            |
  |   "Easier Said Than Done, But Better Done Than Said..."    |
  +------------------------------------------------------------+


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