Leveecius Posted November 18, 2009 Share Posted November 18, 2009 Hey guys, I'm editing my game right now trying to make it so that when you want to search for someone on the game, it limits the amount of people you can search for. It's not working, and wasn't sure if you might be able to tell me why.. if (strip_tags($_POST['hunt_button']) && strip_tags($_POST['hunt_username'])){ $hunt_item=strip_tags($_POST['hunt_item']); $hunt_username=strip_tags($_POST['hunt_username']); $huntlevel = mysql_query("SELECT userlevel FROM users WHERE username='$hunt_username'"); if ($huntlevel >="3"){ print "You cannot search for staff!";} $sql2="SELECT * from search WHERE username='$username'"; $result2=mysql_query($sql2); $num_true2=mysql_num_rows($result2); if ($num_true2 >= 6){ echo "You can not have more than 6 searches out, This is to stop Mass-Killings!";} This code gives me an error - Unexpected T_string in line 148, to which has NOTHING to do with this code. Here is the section which includes line 148. ///////// Tramp ///////// if (($killer_rank == "Tramp")&&($usrrank == "Tramp")){$add = "7000"; } if (($killer_rank == "Tramp")&&($usrrank == "Thief")){$add = "8500"; } if (($killer_rank == "Tramp")&&($usrrank == "Hooligan")){$add = "17000"; } if (($killer_rank == "Tramp")&&($usrrank == "Criminal")){$add = "19500"; } if (($killer_rank == "Tramp")&&($usrrank == "Gangster")){$add Users="24000"; } if (($killer_rank == "Tramp")&&($usrrank == "Boss")){$add ="31500"; } if (($killer_rank == "Tramp")&&($usrrank == "Supreme Boss")){$add = "45000"; } if (($killer_rank == "Tramp")&&($usrrank == "Don")){$add = "60000"; } if (($killer_rank == "Tramp")&&($usrrank == "Legendary Don")){$add = "82000"; } if (($killer_rank == "Tramp")&&($usrrank == "Godfather")){$add = "100000"; } That is lines 142-148. however if I remove my if with the 6 searches only, this error goes away :? Quote Link to comment Share on other sites More sharing options...
Bricktop Posted November 18, 2009 Share Posted November 18, 2009 Hi Leveecius, The problematic line is: if (($killer_rank == "Tramp")&&($usrrank == "Gangster")){$add Users="24000"; } Change it to read: if (($killer_rank == "Tramp")&&($usrrank == "Gangster")){$add="24000"; } Hope this helps. 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.