Re: Dig/Bury command problems

From: DOOMer (doomer@BAYOU.COM)
Date: 07/10/97

At 01:42 AM 7/11/97 -0400, you wrote:
>On Thu, 10 Jul 1997, Michael B. Schlagenhauf wrote:
>> items.  What happens is that a user can dig anywhere and they'll turn up
>> items that are buried in other zones that are still being written.  I've
>> --
>> Mike Schlagenhauf
>I experienced the same problems with the dig command. I made a simple fix
>that allows a player to dig up only one item in the room at a time (that
>   }
>   obj = obj->next;
            ^^^^^^^^^---- = error

  Both of you are wrong, it IS in the original code,
the original code looks a bit like this:

   for (obj = world[ch->in_room].contents; obj; obj = next)
       next = obj->next;

or similar to it....

 anyway, the   ->next  points to the next in the OBJECT LIST!
not the next_in_room type thing for objects (next_in_room is people)

to find the next in a room's list use

that's where your error was in the first place, and why bodega's fix
would only work in the room (and why for only ONE item), because
you start with the FIRST object in the room, and then move to the next
object loaded in the mud? go figure....

anyway,... POINT: use ->next_content to find the next in room or next in
inventory, (inventory, NOT next in object)

 the line above (next = obj->next;)  should be  (next = obj->next_content;)

I spy wit my wittle eye, . . . . . . a big fat ERROR! :-D (figured i should
rub that in)

anyway, code on and have fun,
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: |
      |   |

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