Daron Posted July 28, 2012 Share Posted July 28, 2012 Hey i was working on modifying a one click attack system and i fixed alot of the errors myself but i just cannot fix this error Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/kaname/public_html/attack2.php on line 262 here is the code starting from line 262 $result = mysql_query("UPDATE users SET hp = $r['hp'] WHERE userid=$r['userid']", $c) or die(mysql_error()); $result = mysql_query("UPDATE users SET hp = $ir['hp'] WHERE userid=$userid", $c) or die(mysql_error()); echo "</td></tr>"; ?> Quote Link to comment Share on other sites More sharing options...
mixmaster Posted July 28, 2012 Share Posted July 28, 2012 Hey i was working on modifying a one click attack system and i fixed alot of the errors myself but i just cannot fix this error Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/kaname/public_html/attack2.php on line 262 here is the code starting from line 262 $result = mysql_query("UPDATE users SET hp = $r['hp'] WHERE userid=$r['userid']", $c) or die(mysql_error()); $result = mysql_query("UPDATE users SET hp = $ir['hp'] WHERE userid=$userid", $c) or die(mysql_error()); echo "</td></tr>"; ?> Post the code from lines 252 - 272 Quote Link to comment Share on other sites More sharing options...
Daron Posted July 28, 2012 Author Share Posted July 28, 2012 (edited) this is lines 250-265 if ($db->num_rows($warq) > 0) { $war=$db->fetch_row($warq); $db->query("UPDATE squads SET squadPOINTS=squadPOINTS+1 WHERE squadID={$r['squad']}"); $db->query("UPDATE squads SET squadPOINTS=squadPOINTS-1 WHERE squadID={$ir['squad']}"); } echo "<center><font color=white>You need to train harder.You were defeated.</center>"; } } //UPDATE USERS $result = mysql_query("UPDATE users SET hp = $r['hp'] WHERE userid=$r['userid']", $c) or die(mysql_error()); $result = mysql_query("UPDATE users SET hp = $ir['hp'] WHERE userid=$userid", $c) or die(mysql_error()); echo "</td></tr>"; ?> Edited July 28, 2012 by Daron Quote Link to comment Share on other sites More sharing options...
Sam Fisher Posted July 28, 2012 Share Posted July 28, 2012 On line 262 and 263 replace $result = mysql_query("UPDATE users SET hp = $r['hp'] WHERE userid=$r['userid']", $c) or die(mysql_error()); $result = mysql_query("UPDATE users SET hp = $ir['hp'] WHERE userid=$userid", $c) or die(mysql_error()); with $result = mysql_query("UPDATE users SET hp = {$r['hp']} WHERE userid={$r['userid']}", $c) or die(mysql_error()); $result = mysql_query("UPDATE users SET hp = {$ir['hp']} WHERE userid={$userid}", $c) or die(mysql_error()); hope it works Quote Link to comment Share on other sites More sharing options...
Daron Posted July 28, 2012 Author Share Posted July 28, 2012 i had got impatient and ended up starting over from scratch, apparently i did something right this time because it works xD 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.