Here is a good one for you guys. If you can tell me why it's messing up,
I'll be forever indebted.
(some of the items listed below are shown hard coded for readability here)
/***************************************************************************
***************/
int level = 142;
int quality = 69;
int chance = 100;
float dam;
int damage;
dam = level * ((quality + (chance/10))/100);
damage = dam / 2;
if ( damage <= 0 )
{
sprintf( buf, "Forge: EqLv: %d, Ore Quality: %d, Chance: %d, Dam: %f",
level, quality, chance, dam );
bug( buf, 0 );
}
/***************************************************************************
***************/
Here is the output from the log:
[*****] BUG: Forge: EqLv: 142, Ore Quality: 69, Chance: 100, Dam: 0.000000
HELP!!!
- Valnir