Jump to content
MakeWebGames

Recommended Posts

Posted

This code is almost there it notices the users it selects from

but i should show #2 but it dont it shows #3 on all accounts

 

{
            global $f;
     $q_ry=array();
$q_ry="SELECT * FROM `members_extra` WHERE `my_experience`  >= '".$pl['my_experience']."'";
$pl_rank=mysql_query($q_ry);
$fara=mysql_num_rows($pl_rank);
       echo"<tr><td align = 'left'><b>Game rank:</td><td align='left'>#".$fara."</b></td></tr> ";}

 

any ideas

Posted

You titled it "new engine", so are you creating a new engine? Also can you explain your problem more? I don't understand it at all.

Posted

its the RC engine sorry

basically this code ive built is to rank users by experience in the game and it is shown in there stats bar

but is shows every user as #3

so its not ranking anyone buy experience

Posted

that is almost it

the rest is other code

<tr><td align = 'left'><b>Money:</b> </td><td align = 'left'><span id = 'moneyc'>\$",number_format($pl['wallet']),"</span></td></tr>
            <tr><td align = 'left'><b>Level:</b> </td><td align = 'left'>".$pl['my_level'];
            {
            global $f;
     $q_ry=array();
$q_ry="SELECT * FROM `members_extra` WHERE `my_experience`  >= '".$pl['my_experience']."'";
$pl_rank=mysql_query($q_ry);
$fara=mysql_num_rows($pl_rank);
       echo"<tr><td align = 'left'><b>Game rank:</td><td align='left'>#".$fara."</b></td></tr> ";}


      $q_ry = array();
      $q_ry = "SELECT `my_experience`,`my_crimeexp`
               FROM `members_extra`
               WHERE `playerid` = '".mysql_real_escape_string($_SESSION['playerid'])."'";
      $lvl = array();
      $lvl = mysql_query($q_ry);
      $lv = mysql_fetch_array($lvl);
      if(($lv['my_experience']+($lv['my_crimeexp']/$pl['my_level'])) > exp_level($pl['my_level'])) { echo " [<a href='levelup.php'>Upgrade</a>]"; }
      echo "</td></tr>
Posted

Why is there a global in the middle of the code is a function meant to be above that?

Posted

Because

$fara=mysql_num_rows($pl_rank);
       echo"<tr><td align = 'left'><b>Game rank:</td><td align='left'>#".$fara."</b></td></tr> ";}

 

You're echoing the amount of rows.

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.   Paste as plain text instead

  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...