Jump to content

Javache

Members
  • Posts

    3
  • Joined

  • Last visited

Reputation

0 Neutral
  1. Could somebody tell me if this code in PHP is correct ? <?php function expToLvl($p_nExp) { $nTotalExp=0; for ($nLvl=1; $nLvl <= 99; $nLvl++) { $nCurrExp=$nLvl+300*pow(2,($nLvl/7)); $nCurrExp=floor($nCurrExp)/4; $nTotalExp+=$nCurrExp; if($p_nExp < $nTotalExp) { echo "your lvl is ".$nLvl; break; } } } ?>
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.