Ok,
I've recently subscribed to the list, and I did some searching before
posting this. In all reality, I could just be blind. I'll ask anyway:
I've decided to clean up my area list. Mostly to get rid of overpowered eq
that previous immortals have created.
When I remove areas, and there are players who have eq that is from that
area, the mud would freeze until I could
kill the process and reboot. It would throw out the "Fread_obj: bad vnum
%d." error in the logs. I have fixed this
problem when it comes to individual pieces of eq by editing my save.c to
look like:
if (get_obj_index(vnum) == NULL) { /* Changed to
fix crash when player
logged in with */
bug("Fread_obj: bad vnum %d.", vnum); /*
non-existant eq. -Alderon */
obj = new_obj();
obj->name = str_dup("");
obj->short_descr = str_dup("");
obj->description = str_dup("");
} else {
obj = create_object(get_obj_index(vnum), -1);
new_format = TRUE;
}
The problem is that if the piece of eq is a container (like a backpack) that
is full of eq. The mud will freeze with the
"Fread_obj: incomplete object." error message in the logs. From what I can
gather, the mud is removing the illegal
container, but when it comes to an object that is "nested" in the container
it has no clue what to do and just stops
doing everything. The piece of code is:
if (!str_cmp(word, "End")) {
// if (!fNest || !fVnum || obj->pIndexData == NULL) {
if ( !fNest || ( fVnum && obj->pIndexData == NULL ) ){
bug("Fread_obj: incomplete object.", 0);
free_obj(obj);
return;
} else
{
if ( !fVnum )
{
free_obj( obj );
obj = create_object( get_obj_index( OBJ_VNUM_DUMMY ), 0
);
}
I'm sorry that the note is too long...I'll try to do better on my next
posting.
Thank you,
Alderon
AnimeMUD 2 anime2.ipupdater.net:7000