PING1434a
06-12-2005, 10:14 PM
Hello, I just installed this RPG Hack into a fresh installation of VB 3.0.7
I tried it out to see what it was like, but after making a post i got an error:
at the very top of the page, i get:
Warning: Invalid argument(s) passed to pow() in /includes/functions_rpg.php on line 591
Warning: Invalid argument(s) passed to pow() in /includes/functions_rpg.php on line 591
than i get this message:
vBulletin Message
Unable to add cookies, header already sent.
File: N/A
Line: 0
it seems like there's a problem with:
$level = pow(log10($experience), $exprate);
in
function fetch_rpg_level($experience, $exprate = 3, $returnfloat = 0)
{
if ($returnfloat)
{
if ($experience > 0)
{
$level = pow(log10($experience), $exprate);
return $level;
}
else
{
return 1;
}
}
else
{
if ($experience > 0)
{
$level = floor(pow(log10($experience), $exprate)) + 1;
return $level;
}
else
{
return 1;
}
}
}
Can anyone point me to the right direction?
FIXED! it's my PHP version that was causing it... that's what it seems like, I added (float) in front of the variable and got a work around. My php version is 4.2.2
I tried it out to see what it was like, but after making a post i got an error:
at the very top of the page, i get:
Warning: Invalid argument(s) passed to pow() in /includes/functions_rpg.php on line 591
Warning: Invalid argument(s) passed to pow() in /includes/functions_rpg.php on line 591
than i get this message:
vBulletin Message
Unable to add cookies, header already sent.
File: N/A
Line: 0
it seems like there's a problem with:
$level = pow(log10($experience), $exprate);
in
function fetch_rpg_level($experience, $exprate = 3, $returnfloat = 0)
{
if ($returnfloat)
{
if ($experience > 0)
{
$level = pow(log10($experience), $exprate);
return $level;
}
else
{
return 1;
}
}
else
{
if ($experience > 0)
{
$level = floor(pow(log10($experience), $exprate)) + 1;
return $level;
}
else
{
return 1;
}
}
}
Can anyone point me to the right direction?
FIXED! it's my PHP version that was causing it... that's what it seems like, I added (float) in front of the variable and got a work around. My php version is 4.2.2