Re: [CODE] help with make_corpse

From: Admin of The Keep (
Date: 09/23/96

On Sun, 22 Sep 1996, Sliver wrote:

> I am trying to put in implants in my mud, implants that
> stay with you when you die, and re-enter the game.
>   /* transfer character's equipment to the corpse */
>   for (i = 0; i < NUM_WEARS; i++)
>     if (GET_EQ(ch, i) && GET_OBJ_TYPE(i) != ITEM_IMPLANT) {
>       obj_to_obj(unequip_char(ch, i), corpse);
>     }

Well, duh.  'i' is an integer, not a obj_data structure.  :)

You might consider using GET_OBJ_TYPE on the object, instead of the
integer.  (eg., GET_OBJ_TYPE(GET_EQ(ch, i)) != ITEM_IMPLANT).  That will
fix it...

[and whomever the hell thought paranetheses inside the if() statement
would change anything in this case should read a C book]


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

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