$percentage=(($target_score/($fleet_score+$total_score))*.4)*100;
if ($percentage >= 10) {
$percentage='10';
$capped=$target_roids*($percentage/100);
} else {
$capped=$target_roids*($percentage/100);
}
}
I get different results on a calculator than I don with this script. This is the order
i do things on the calc:
($fleet_score+$total_score))*.4)
then the
(($target_score/
then the
*100
i think my problem is some where in the if ($percent >=10) that port is there because
regardless of the results returned by the formula the percentage can never be larger
than 10