Uridium Posted June 29, 2008 Posted June 29, 2008 Im hoping someone can help me with this when my members stale mate they get a message saying that they shuld have trained harder then for some reason they are unable to attack again unless i goto my PhpMyAdmin under Users/Attacking/Attcking and remove the number thats there usually the number is 252.and replacing with zero This is the only way ive found that will unban them if unban is the wrong word,,, Quote
Isomerizer Posted June 29, 2008 Posted June 29, 2008 Re: Stalemate bans members Is it some sort of modification? Can i see the code that calls the stalemate function. Quote
POG1 Posted June 29, 2008 Posted June 29, 2008 Re: Stalemate bans members mqsql_query(UPDATE 'users' SET 'atacking' = '0' WHERE 'userid' = ".mysql_real_escape_string($userrid)); try that in the stalemate page Quote
Floydian Posted June 29, 2008 Posted June 29, 2008 Re: Stalemate bans members mqsql_query(UPDATE 'users' SET 'atacking' = '0' WHERE 'userid' = ".mysql_real_escape_string($userrid)); try that in the stalemate page There's no reason to escape the $userid. Number one, $userid is derived from the $_SESSION['userid']; variable, which itself was orginally pulled from the database upon confirming the password and the login name. Therefore, $userid is not user INPUT. However, I think it is good practice to type cast the userid anyways. Number two, you have quotes around your database tables when it should be back ticks. And the back ticks are really not required here. Number three: you're missing a " at the beginning of the query. Number four: You misspelled attacking, and number fiver: you misspelled userrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrid. $q_update = sprintf('update users set attacking = 0 where userid = %d' $userid); mqsql_query($q_update, $c); if it's version 2 of mccodes $q_update = sprintf('update users set attacking = 0 where userid = %d' $userid); $db->query($q_update); Quote
AlabamaHit Posted July 6, 2008 Posted July 6, 2008 Re: Stalemate bans members I agree...but that will fix it lol..... Looks like for some reason you put in the code to update the users attacking to 252 (guessing thats the round of stalemate)....But it should be updated to 0. So they don't lose exp. 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.