![]() |
Just installed the hack.. but error...
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 |
Makes no sense that the "returnfloat" shouldn't make it return float :P
Ill fix it for the next version, thanks for letting me know :) |
yeah! basically, this is what i did:
$level = pow(log10((float)$experience), (float)$exprate); instead of : $level = pow(log10($experience), $exprate); i'm guessing it's just problem with older version of php since no one else seems to be having problem with it -.-; Thanks for the GREAT hack by the way! |
What I did was put floatval() around the entire line, like so:
$level = floatval(pow(log10($experience), $exprate)); Guess it has the same effect ;) And yeah, I would have to go with old PHP version too. But it's always nice to be backwards compatible ;) Im glad you enjoy the hack, and I'll be looking forward to having you with us even onto vB 3.5 and the new heights the hack will reach :) //peace |
All times are GMT. The time now is 06:06 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|