PDA

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


winston
23 Nov 2001, 16:23
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
24 Nov 2001, 16:20
No help yet.....
been up all night in edit plus.
grrrrrrrrrrrrr. help anyone? please?

Mark Hensler
25 Nov 2001, 06:42
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
25 Nov 2001, 13:17
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
26 Nov 2001, 05:47
"Parentheses" are the smooth ones, "braces" or "square braces" are the squared ones, so what do you call those squiggly thingies? :stupid:

Goldfinger
26 Nov 2001, 20:49
} = bracket

[100th post :D]

Mark Hensler
26 Nov 2001, 23:10
And what's an "inverted comma"?

Goldfinger
26 Nov 2001, 23:15
' = apostrophe ?