WarMad Posted May 22, 2016 Share Posted May 22, 2016 (edited) no matter what i do when a fight is over and i choose to put them in the hosp/mug/ or leave i get the thing for cheaters saying i lose all my exp how do i fix that? this is the code causing it if ($dosessh && isset($_SESSION['attacking'])) { if ($_SESSION['attacking'] > 0) { print "<center><b>You tried to run from a fight.<br/>Dont worry for cheating you wont be going up a level any time soon.</b></center>"; mysql_query("UPDATE users SET exp=0 WHERE userid=$userid", $c); $_SESSION['attacking'] = 0; } } Edited May 22, 2016 by WarMad Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 22, 2016 Share Posted May 22, 2016 Most likely its not setting your session back to 0 for attacking. You need to make sure that it is doing that. Quote Link to comment Share on other sites More sharing options...
WarMad Posted May 22, 2016 Author Share Posted May 22, 2016 im pretty sure this in attackwin.php should be telling it to do so $_SESSION['attacking'] = 0; correct me if i am wrong Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 22, 2016 Share Posted May 22, 2016 Yes, but you may be encountering some sort of error before it does so causing it not run. Do you have any kind of errors on your screen that pops up? If so, you should definitely fix those Quote Link to comment Share on other sites More sharing options...
WarMad Posted May 22, 2016 Author Share Posted May 22, 2016 nope no errors what so ever Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 22, 2016 Share Posted May 22, 2016 Try putting that near the very top of the script if its not already there and see if that helps. If not, I have no idea ATM Quote Link to comment Share on other sites More sharing options...
WarMad Posted May 22, 2016 Author Share Posted May 22, 2016 ya it is right at the top :/ i will add it to attack hosp and all that as well see if that helps Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 22, 2016 Share Posted May 22, 2016 Or you can try putting it in the attack script where it displays the links Quote Link to comment Share on other sites More sharing options...
WarMad Posted May 22, 2016 Author Share Posted May 22, 2016 yea i did that right before you told me that haha that fixed it 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.