Jump to content

Recommended Posts

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 :?

Link to comment
https://forums.phpfreaks.com/topic/181998-odd/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.