[Help] Math Error?

From: Akuma/Chris Baggett/DOOMer (doomer18@EARTHLINK.NET)
Date: 04/12/98


I realize that this is not really too CircleMUD related,
but would someone mind helping me out with this problem.

Given:
int top_of_dam_messt = 18;
int perc_hit = 6;

  msgnum = (int)(((perc_hit)/(top_of_dam_messt + 1)) + 0.5);

Why does msgnum keep coming out to Zero (0)?

I'd appreciate some help on this.  I'm trying to make
damage messages load from a file much like fight messages do
so that I can reboot them from the mud.

I'd appreciate any help on this.

Code On
Akuma the Raging Coder

  +----------------------------------------------------------------+
  |     "Yea, though I code in the Valley of the Shadow of No      |
  | Documentation, I will fear no task: for thy C Book is with me" |
  |          "Nothing is IMPOSSIBLE, Just IMPROBABLE"              |
  |     "Easier Said Than Done, But Better Done Than Said..."      |
  +----------------------------------------------------------------+


     +------------------------------------------------------------+
     | 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