[CODE] Newbie

From: Chuck Reed (creed@I-55.COM)
Date: 02/18/98


Been awhile since I had to use that header, anyhow:

I have this formula for exp distribution to a group

base = (GET_LEVEL(ch) / total_levels) * GET_EXP(victim);

However, one small problem.  When I do the GET_LEVEL(ch) / total_levels it
usually turns out a 0.*** like its supposed to.  I thought that it would
just accept that and continue the operation with the decimal, multiply by
GET_EXP, get another decimal (like 1300.76) and knock it down to an integer
there.  Any idea of how to get away with this?  I could do it if I knew
some kind of trunc() function, but i don't know of any.

Chuck


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