Jump to content

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


tinboye

Recommended Posts

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?

[code]
<?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

?>
[/code]

$qr[$i][2] being what echos the networth on the page.
Link to comment
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.