why isnt this value rounding off?
Posted: Thu Dec 07, 2006 10:37 pm
Im trying to round a value off
this is my code
$_SESSION['strdmg']==rand(0, $_SESSION['strdmg'] * 2);
(above generates a random number between 0 & strdmg * 2, which btw is always 1.
(below is suppost to round it off, so it'd be 2.0 (i cant have decimal damage in my game, nor do I want it))
$_SESSION['strdmg']==round($_SESSION['strdmg']);
any idea's o_O
this is my code
$_SESSION['strdmg']==rand(0, $_SESSION['strdmg'] * 2);
(above generates a random number between 0 & strdmg * 2, which btw is always 1.
(below is suppost to round it off, so it'd be 2.0 (i cant have decimal damage in my game, nor do I want it))
$_SESSION['strdmg']==round($_SESSION['strdmg']);
any idea's o_O