Dark Jim
08-31-2002, 01:47 PM
I've attached the file here. This part is causing trouble:
$expneed = 50;
$expaddedneed = 0;
$tempexp = $exp;
while ($tempexp > 0)
{
$tempexp - $expneed;
$expaddedneed = $expaddedneed + 25;
if (($tempexp == 0) || ($tempexp > 0))
{$level++;}
$expneed = $expneed + $expaddedneed;
}
When I enter a value for exp that is not 0 then it doesn't work because I get a connection timed out every time. What am I doing wrong? :(
Also can anyone help making this part a little more efficient?
$lastuserid=$DB_site->query_first("SELECT MAX(userid) AS lastuser FROM user");
echo "<tr class='".getrowbg()."' valign='top'><td>";
$counter = 1;
while ($counter != ($lastuserid['lastuser']+1))
{$someuser=$DB_site->query_first("SELECT username FROM user WHERE userid=$counter");
if ($someuser[username]!="") {
echo "<a href=\"rpgadmin.php?action=edituser&ausername=$someuser[username]\">$someuser[username]</a><br>";
}
$counter++;
}
echo "</td></tr>";
$expneed = 50;
$expaddedneed = 0;
$tempexp = $exp;
while ($tempexp > 0)
{
$tempexp - $expneed;
$expaddedneed = $expaddedneed + 25;
if (($tempexp == 0) || ($tempexp > 0))
{$level++;}
$expneed = $expneed + $expaddedneed;
}
When I enter a value for exp that is not 0 then it doesn't work because I get a connection timed out every time. What am I doing wrong? :(
Also can anyone help making this part a little more efficient?
$lastuserid=$DB_site->query_first("SELECT MAX(userid) AS lastuser FROM user");
echo "<tr class='".getrowbg()."' valign='top'><td>";
$counter = 1;
while ($counter != ($lastuserid['lastuser']+1))
{$someuser=$DB_site->query_first("SELECT username FROM user WHERE userid=$counter");
if ($someuser[username]!="") {
echo "<a href=\"rpgadmin.php?action=edituser&ausername=$someuser[username]\">$someuser[username]</a><br>";
}
$counter++;
}
echo "</td></tr>";