Jump to content
MakeWebGames

Fatal error: Cannot redeclare get_rank() (previously declared...................


-CrAzY-

Recommended Posts

I Tryed Adding The Ranks Mod;

 

function get_rank($stat, $mykey)

{

global $ir,$userid,$c;

$q=mysql_query("SELECT count(*) FROM userstats us LEFT JOIN users u ON us.userid=u.userid WHERE us.$mykey > $stat AND us.userid != $userid AND u.user_level != 0", $c) ;

return mysql_result($q,0,0)+1;

}

function get_gamerank($level, $housevalue, $stats)

{

$tp=($level*$level) * 3000 + ($housevalue) + (($stats['strength']+$stats['agility']+$stats['guard']+$stats['labour']+$stats['IQ']) * 10);

if ( $tp < 100000 ) { return "#1 First Newbie"; }

else if ( $tp < 400000 ) { return "#2 Newbie"; }

else if ( $tp < 1600000 ) { return "#3 Beginner"; }

else if ( $tp < 6400000 ) { return "#4 Not Experienced"; }

else if ( $tp < 25600000 ) { return "#5 Rookie"; }

else if ( $tp < 102400000 ) { return "#6 Average"; }

else if ( $tp < 409600000 ) { return "#7 Good"; }

else if ( $tp < 819200000 ) { return "#8 Very Good"; }

else if ( $tp < 3276800000 ) { return "#9 Greater Than Average"; }

else if ( $tp < 13107200000 ) { return "#10 Experienced"; }

else if ( $tp < 52428800000 ) { return "#11 Highly Experienced"; }

else if ( $tp < 209715200000 ) { return "#12 Honoured"; }

else if ( $tp < 838860800000 ) { return "#13 Highly Hounoured"; }

else if ( $tp < 3355443200000 ) { return "#14 Respect King"; }

else if ( $tp < 6655886400000 ) { return "#15 True Champion"; }

}

But It Says;

Fatal error: Cannot redeclare get_rank() (previously declared in /home/imgame/public_html/global_func.php:192) in /home/imgame/public_html/global_func.php on line 214

Can Anyone Help Thanks, Ive Tryed My Hardest :-(

Link to comment
Share on other sites

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