I've added a check in one function to take an object automatically from a players's container worn in a certain location if it's there.
So far, so good. The line after that, though,
keeps returning the error message (Log: [*****] BUG: equip_char: obj not being carried by ch!) if the char already had an identical item to the one he's getting from the container.
Further down, the object is extracted, but again an error message pops up, this time reading: Log: [*****] BUG: extract_obj: obj 107 already extracted!
This works fine, however, when there is no duplicates of this item in the char's inventory.
Any ideas?
separate_obj(ammo);
get_obj( ch, ammo, container, FALSE );So far, so good. The line after that, though,
equip_char( ch, ammo, WEAR_HOLD );keeps returning the error message (Log: [*****] BUG: equip_char: obj not being carried by ch!) if the char already had an identical item to the one he's getting from the container.
Further down, the object is extracted, but again an error message pops up, this time reading: Log: [*****] BUG: extract_obj: obj 107 already extracted!
This works fine, however, when there is no duplicates of this item in the char's inventory.
Any ideas?