dean7 Posted April 17, 2017 Share Posted April 17, 2017 Hey all, I'm making game which allows you to "Race" the computer, if you are quicker than the computer you win if you not you lose. I'm allowing users to race 3 computers on one script, but after they raced on it they cannot do it again for another 2 minutes. Problem I'm having is after they clicked the race name it should automatically say that you cannot race again for the 2 min but still allow you to race the other races. Although, currently when you race the first race it updates as it should but it says "You must wait 2 minutes before you can race again" on the races I haven't raced and says I must wait 17273day(s) 18hr(s) 29min(s) 35sec(s) until I re click the page the it says the correct thing for all races. echo '<form name="form1" method="post" action=""><br /> <table width="650" border="1" align="center" class="table"><tr align="center" class="header"> <td colspan="2">Drag Race</td></tr><tr class="UnderTable"> <td align="center">Distance</td></tr>'; $timersclear = TRUE;if($UserStuff['dragone'] + $timer < $now) {echo"<tr><td align='center'><a href='?DragOne=QuarterMile'>Quarter Mile Drag</a></td></tr>";}else{$timersclear = FALSE;$timeleft1 = ($UserStuff['dragone']+$timer) - $now;$timeleft1 = seconds($timeleft1);echo"<tr><td colspan='2' align='center'>Please wait for this dragster to return! || $timeleft1</td></tr>";}if($UserStuff['dragtwo'] + $timer < $now) {echo"<tr><td align='center'><a href='?DragTwo=HalfMile'>Half Mile Drag</a></td></tr>";}else{$timersclear = FALSE;$timeleft2 = ($UserStuff['dragtwo']+$timer) - $now;$timeleft2 = seconds($timeleft2);echo"<tr><td colspan='2' align='center'>Please wait for this dragster to return! || $timeleft2</td></tr>";} if($UserStuff['dragthree'] + $timer < $now) {echo"<tr><td align='center'><a href='?DragThreeMile'>Mile Drag</a></td></tr>";}else{$timersclear = FALSE;$timeleft3 = ($UserStuff['dragthree']+$timer) - $now;$timeleft3 = seconds($timeleft2);echo"<tr><td colspan='2' align='center'>Please wait for this dragster to return! || $timeleft3</td></tr>";} echo '</tr></table>'; Is there a way I could perhaps stop this problem? Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.