ok im am writing a custom rpg mod modified from VB.. My Problem Is Getting Workable Variables for the point system

$level = pow (log10 ($post[posts]), 3);
$ep = floor (100 * ($level - floor ($level)));
$showlevel = floor ($level + 1);
$hpmulti =round ($postsperday / 6, 1);
if ($hpmulti > 1.5) {
$hpmulti = 1.5;
}
if ($hpmulti < 1) {
$hpmulti = 1;
}
$maxhp = $level * 25 * $hpmulti;
$hp= $postsperday / 10;
if ($hp >= 1) {
$hp= $maxhp;
} else {
$hp= floor ($hp * $maxhp);
}
$hp= floor ($hp);
$maxhp= floor ($maxhp);
if ($maxhp <= 0) {
$zhp = 1;
} else {
$zhp = $maxhp;
}
$hpf= floor (100 * ($hp / $zhp)) - 1;
$maxmp= ($jointime * $level) / 5;
$mp= $post[posts] / 3;
if ($mp >= $maxmp) {
$mp = $maxmp;
}
$maxmp = floor ($maxmp);
$mp = floor ($mp);
if ($maxmp <= 0) {
$zmp = 1;
} else {
$zmp = $maxmp;
}
$mpf= floor (100 * ($mp / $zmp)) - 1;
My Problem Is I Cant Seem To Get The Posting Info To Work With The Function.... such as
$level = pow (log10 ($postinfo), 3);
I Always Get Crappy Numbers Such As #$%^ In The Requested information Area when using log10.. I Am Trying To Base This Rpg Mod On Just The Total Count Of Posts User Has An The Function Will Alter What It Needs To Display The Info..
Am i Missing Something Here Or Is My Coding Crap??
Also What Are The Variables That Tell Total Post Count post perday,& join time in yabbse.. if i can get these variables to work i guess i can finish up on this mod
Any Help Would Be Appreciated
