On Tue, 3 Feb 1998, KombatMUD Administrator wrote:
>In my mud if you do an extremely high ammount of damage. (somewhere
>around 10000, not sure of exact number yet) the mud crashes. I have tryed
I had to hard code dice() to not accept over 100d100 after a builder made a
1-billion-d1 weapon. The MUD would spend so long computing the damage that
the timer would expire and it would stop.
>changing all references of dam and damage to unsigned long from int, and I
>put in some code in the damage() function which if the damage is greater
>than the target's max hit + 20 then it = the target's max hit + 20, I know
int = long = float = 4 bytes in Linux for x86.
You might want to log your dice() function to see if it is getting any huge
values also.
--
George Greer - Me@Null.net | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST