Hi, There could be an arithmetic exception if GET_MAX_HIT(ch) returns a number less than 50. If it does (int)(49/50) = 0; Then you get a division by zero in the ASTERISK(ch) = (GET_HIT(ch) / GET_HPR(ch)), The best way to set up your asterisks (IMHO) is with : ASTERISK(ch) = (50 * GET_HIT(ch)/GET_MAX_HIT(ch)) Later... ...Chuck Crom of Dragon'Spire On Tue, 23 Jul 1996, Adam Days wrote: > Okay I went with Christopher's idea. Now I have a new problem with it. > (or old I guess.). When I went and tested it with a new character and > went in and typed score, it crashed and gave me an "Arithmetic Exception" > error. what gives? > These are the three things I'm using for the life bar. > GET_HPR(ch) = (GET_MAX_HIT(ch) / 50) > then, > ASTERISK(ch) = (GET_HIT(ch) / GET_HPR(ch)) > Now shouldn't those work? > Why wouuld a lower level character make it crash, is it because of their > lower hit points? > ******************************************************************************* > Adam Days a.k.a ** "Being an Outcast is only a frame of mind > Drizzt Do'Urden ** and not something that is placed upon > Unholy Lands <164.116.34.2 4000> ** you." -Adam Days > ******************************************************************************* > >
This archive was generated by hypermail 2b30 : 12/07/00 PST