problem... new one

Posted by Matt on Thu 09 Aug 2001 10:55 AM — 3 posts, 14,174 views.

#0
thanx for the help with the update, it works like a charm now... although now i got a new problem... it seems whenever hit / hp goes over 3500 the pl function which appears on the prompt as a number, starts to go into negatives.. any idea how to fix this problem..

thanx

matt
Australia Forum Administrator #1
Probably because before you divide by 10 it goes over 35000, and you might be storing it into a short which only holds 32767.

Try this:


ch->pl = ((long) ch->max_hit * (long) ch->max_move) / 10L;
#2
thanx... i ended up working it out, i had to change a couple of int's to long's in mud.h

but it's good to know at least someone is tryin to help the newbie coders..

thanx

matt