heh, so long as everything has a weight of 1 they can't carry that much.
Put a few UMAX() macros in the DB boot.. load_objects or something,
after the fread_number for the weight do something like this:
obj->weight = UMAX(1, obj->weight);
Also might wanna check save.c: fread_obj cuz it will assign the weight
to objects not found in the database.. change the KEY() to something
like:
if (!str_cmp(word, "Weight")) {
fMatch = TRUE;
obj->weight = fread_number(fp);
obj->weight = UMAX(1, obj->weight);
break;
}
I guess that's the easiest way without having to make a local var and
read the number to that then assign it to the object weight o_O
Hm, I wonder if it's a string space problem or it just takes so long to
process the loop that the server kills the process.. had that happen to
me before.. try purging 10k objects sitting in a room ;p
whatever.. I need food.
-mend
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Thursday, February 07, 2002 7:44 AM
Subject: RE: Inventory Bug
> "But the latter seems like a lot of work."
>
> That's what running a MUD is all about...
>
> -----Original Message-----
> From: Brian Merkley [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 06, 2002 8:04 PM
> Cc: Rom Mailing-list
> Subject: Inventory Bug
>
>
> Hey all!
>
> I am running modified Rom 2.4 that I took over and currently there is
no
> limit to how many items a player may have in his inventory or in
backpacks.
> And if they view the inventory or backpack if it has over a certain amount
> of items (apparently over 200) the entire mud crashes. What is the best
way
> to fix this? I have never tried to add a max_inventory check or possibly
add
> weight to all items and add a weight limitation based off str. But the
> latter seems like a lot of work. I am just looking for an EZ fix to stop
the
> crashes. Besides players really don't need to hoard that much equipment
> anyway.
>
> Thanks, Brian
>
>
>
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>