Jump to content


Photo

max sum is 18,446,744,073,709,551,615


  • Please log in to reply
No replies to this topic

#1 tinboye

tinboye
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 25 April 2006 - 02:34 AM

I run a game where when your total networth reaches 18,446,744,073,709,551,615 then it does not echo any more. how would I increase this amount to echo true amount?

<?php

if ( $offset == "" ) $offset = 0;
else {
    $offset = abs($offset);
    $offset -= $offset % $myrank_dispperpage;
}
if ( $loc_id == "" ) {
    $loc_id = 0;
    $title = "Global";
} else {
    $loc_id = abs($loc_id);
    $loc_namef = getLOCnameFfID($loc_id);
    $title = "{$loc_namef}";
}
$size = "+0";
$width = "98%";
$title .= " Player Rankings";
include("starttable.php");

$linkstr = "Select additional rankings:\n<br>\n<br>" . mylink("Player Rankings")."Global</a>";
$qr = outqa("SELECT name, country FROM locations ORDER BY location_id ASC");
for ( $i=0; $i<count($qr); $i++ )
    $linkstr .= " | " . mylinkex("Player Rankings","loc_id=".($i+1) )."{$qr[$i][0]}, {$qr[$i][1]}</a>";
centerme($linkstr);

if ( $loc_id == 0 ) {
 $qr = outqa("SELECT rank_global, name, points, gang_id, location_id, class, cash FROM rusers WHERE status!='Survey' AND status NOT LIKE 'CON::%' ORDER BY rank_global ASC LIMIT {$offset}, {$myrank_dispperpage}");
 $actnum = outqs("SELECT COUNT(*) FROM rusers");
} else {
 $qr = outqa("SELECT rank_local, name, points, gang_id, location_id, class, cash, rank_global FROM rusers WHERE status!='Survey' AND status NOT LIKE 'CON::%' AND location_id={$loc_id} ORDER BY rank_global ASC LIMIT {$offset}, {$myrank_dispperpage}");
 $actnum = outqs("SELECT COUNT(*) FROM rusers WHERE location_id={$loc_id}");
}

echo "\n<p><table width=95% align=center rules=none border=0 cellspacing=3 cellpadding=0 bgcolor=#{$bgo}>";
if ( $loc_id == 0 )
    echo "\n\n<tr><td>{$font}<b>Rank</b></font></td>";
else {
    echo "\n\n<tr><td>{$font}<b>Local<br>Rank</b></font></td>";
    echo "\n<td>{$font}<b>Global<br>Rank</b></font></td>";
}
echo "<td>{$font}<b>Name</b></font></td>";
echo "<td>{$font}<b>Class</b></font></td>";
if ( $loc_id == 0 )
    echo "<td align=center>{$font}<b>Location</b></font></td>";
echo "<td align=right>{$font}<b>Cash</b></font></td>";
echo "<td align=right>{$font}<b>Net Worth</b></font></td></tr>";
for ( $i=0; $i<count($qr); $i++ ) {
    echo "\n\n<tr><td>{$font}{$qr[$i][0]}</font></td>";
    if ( $loc_id > 0 )
        echo "\n<td>{$font}{$qr[$i][7]}</font></td>";

    $gs = getCname($qr[$i][3]);
    if ( $gs != "" ) $gs = " (<a href=\"{$PHP_SELF}?func=spy&gangxor_id={$qr[$i][3]}\" target=_top>" . $gs . "</a>)";
    echo "\n<td>{$font}<a href=\"{$PHP_SELF}?func=spy&user_name={$qr[$i][1]}\" target=_top>{$qr[$i][1]}</a>{$gs}</font></td>";
    echo "<td align=left>{$font}{$class_names[ $qr[$i][5] ]}</font></td>";
    if ( $loc_id == 0 )
        echo "<td align=center>{$font}" . getLOCnameFfID($qr[$i][4]) . "</font></td>";
    echo "\n<td align=right>{$font}" . prettymoney($qr[$i][6]) . "</font></td>";
    echo "\n<td align=right>{$font}" . prettymoney($qr[$i][2]) . "</font></td></tr>";
}
if ( count($qr) == 0 )
    echo "\n<tr><td colspan=5 align=center>{$font}<I>No players are ranked under these criteria</I>.</font></td></tr>";

echo "\n</table></p>"; // close inner table

$linkstr = "";
if ( $offset > 0 ) $linkstr = mylinkex("Player Rankings","offset=".($offset-$myrank_dispperpage)."&loc_id={$loc_id}" )."Previous {$myrank_dispperpage} rankings</a>";
if ( $offset+$myrank_dispperpage < $actnum ) {
    if ( $linkstr != "" ) $linkstr .= " | ";
    $linkstr .= mylinkex("Player Rankings","offset=".($offset+$myrank_dispperpage)."&loc_id={$loc_id}" )."Next {$myrank_dispperpage} rankings</a>";
}
if ( $linkstr != "" )
    centerme($linkstr . "\n<br>Total records: {$actnum}");

echo "\n</td></tr></table>"; // close PLAYER RANKS table

?>

$qr[$i][2] being what echos the networth on the page.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users