Jump to content
MakeWebGames

Need Help For HIT/MISS Formula


SHAD

Recommended Posts

OK hoping someone can help me out here abit, the below code is just abit of the formula i am making for hit/miss but getting a problem.

The output of the below code is 14.2857142857 but i want it just as 14,so how can that be achieved?

$MYACCURACY = 1000;

$HISDODGE = 700;

$Divide = $MYACCURACY/$HISDODGE; $Multiply = $Divide*100/10;

if($Multiply < 1) {$Multiply = 1;} else{abs(intval(round($Multiply)));}

echo"{$Multiply}";

Thanks :)

Edited by SHAD
code tags didn't work for me :(
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...