WarMad Posted May 22, 2016 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
KyleMassacre Posted May 22, 2016 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
WarMad Posted May 22, 2016 Author 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
KyleMassacre Posted May 22, 2016 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
KyleMassacre Posted May 22, 2016 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
WarMad Posted May 22, 2016 Author 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
KyleMassacre Posted May 22, 2016 Posted May 22, 2016 Or you can try putting it in the attack script where it displays the links Quote
WarMad Posted May 22, 2016 Author Posted May 22, 2016 yea i did that right before you told me that haha that fixed it Quote
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.