PDA

View Full Version : Help I'm down with a parse error!!


winston
11-23-2001, 03:23 PM
Ok I had 2.20 installedd an dthe exp level hack installed. When i upgraded to 2.21 it replaced adm/ functions.php. When i resinstall teh hack in this file I get this error.
__________________________________________________ _
Parse error: parse error in ./admin/functions.php on line 296

Fatal error: Call to undefined function: getuserinfo() in ./admin/sessions.php on line 108

__________________________________________________ __
Hers the code I'm trying to get in there.
Admin/ Functions.php
###Find###
// do ip addresses
________________________________________
###Under it add###
// start of User EXP, MP, HP hack
$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;
// end of User EXP, MP, HP hack

any help would be so greatly appreciated.

winston
11-24-2001, 03:20 PM
No help yet.....
been up all night in edit plus.
grrrrrrrrrrrrr. help anyone? please?

Mark Hensler
11-25-2001, 05:42 AM
Parse error: parse error in ./admin/functions.php on line 296

Fatal error: Call to undefined function: getuserinfo() in ./admin/sessions.php on line 108 What is on line 296 of functions.php?
I'm not sure what the policy is of posting vB code, but I'm sure they would rather you didn't. Just look at that line. Look at it long and hard. That's where your error is. A parse error could be a missing semi-colon on the line above, or any other syntax error on that line. If it is the last line of the file, it is most likely a missing squigglye brace thingy "{" or "}". Err... ummm... that's all I can think of right now.

Scott MacVicar
11-25-2001, 12:17 PM
If it can't call another function your definately missing semi-colon, inverted comma's or parenthesis (squigglye brace thingy). As the code for the hack looks fine i think your probably placed it at the wrong point.

Mark Hensler
11-26-2001, 04:47 AM
"Parentheses" are the smooth ones, "braces" or "square braces" are the squared ones, so what do you call those squiggly thingies? :stupid:

Goldfinger
11-26-2001, 07:49 PM
} = bracket

[100th post :D]

Mark Hensler
11-26-2001, 10:10 PM
And what's an "inverted comma"?

Goldfinger
11-26-2001, 10:15 PM
' = apostrophe ?