Well, lets think about this then. Unless all your item types are screwy,
which probably isn't likely, but it's a maybe. I'd look more into they
fwrite_obj. Now, I'm not all to sure what it would be doing. S'been awile
since I worked with a ROM derivitive. Maybe step through the process to see
why its happening with gdb. Thats about the best advice I can give you. I've
never heard of a problem with my snippet like this, and if there was, no one
ever e-mailed the bug to me :P. On another thought, I remember some mods had
to be done to fwrite_obj to get it to work with a NULL character, so make
sure that mod is correct.
Davion
From: [EMAIL PROTECTED]
To: "Davion Kalhen" <[EMAIL PROTECTED]>
Subject: Re: Object Saving
Date: Sun, 14 Sep 2003 21:56:34 +0000
I tried that and it appears that any objects that are in the room with the
corpse gets saved in the file also. I don't see why it's happening as I
thought the item_type check would stop that also.
Any ideas?
-Mike
> Hmmm, that shouldn't be happening. Are you sure its that code. With the
> obj->item_type == ITEM_CORPSE_PC check, only corpses should save. You
should
> check to see what data is being saved, by stopping it from unlinking the
> objcopy.txt file.
>
> Davion
>
>
> >From: [EMAIL PROTECTED]
> >To: [email protected]
> >Subject: Object Saving
> >Date: Thu, 11 Sep 2003 05:06:51 +0000
> >
> >I'm trying to add object saving over copyovers to my mud and having a
bit
> >of
> >trouble. If the corpse is in a room that has resets in it (ie..
donation
> >pits), the corpse saves but when it reloads I get multiple
pits/fountains
> >etc...
> >
> >I'm using Davion's corpse saving snippet. The section of code that
checks
> >for resets is below. Can someone tell me if this looks accurate. I
can
> >post
> >more of the code if need be.
> >
> >Thanks for your help.
> >
> >-Mike
> >
> >fpObj = fopen("../area/objcopy.txt", "w" );
> >for ( obj = object_list; obj != NULL; obj = obj->next )
> >{ has_reset = FALSE;
> > if(obj->carried_by )
> > continue;
> >
> > if(obj->item_type != ITEM_CORPSE_PC )
> > continue;
> >
> >for ( pReset = obj->in_room->reset_first; pReset; pReset = pReset->next
)
> > { if(( (pReset->command == 'O' || pReset->command== 'P')
> >&& pReset->arg3 == obj->pIndexData->vnum ) ||
> >( pReset->command == 'E' && pReset->arg1 == obj->pIndexData->vnum ) )
> > { has_reset = TRUE;
> > break;
> > }
> > }
> > if(has_reset)
> > continue;
> > fwrite_obj(NULL, obj, fpObj, 0 );
> > }
> > fprintf(fpObj, "#END\n");
> > fclose(fpObj);
> > > No one has any idea at all?
> > >
> > >
>
> _________________________________________________________________
> Tired of spam? Get advanced junk mail protection with MSN 8.
> http://join.msn.com/?page=features/junkmail
>
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail