PDA

View Full Version : Error..Help


Peace
02-09-2003, 08:40 PM
I'm installing the Karma Hack. I got an error. Should I look for the '}' to edit out? Here's the error and line 7 in showthread.php

Parse error: parse error, unexpected '}' in /home/www/theonlinelounge/forums/showthread.php on line 7


Here's Line 7 in showthread.php
{$DB_site->query("INSERT INTO storepoint (uid, view) VALUES ($postuserid, $newview)");} } elseif ($views == $view5) { $newview = $view + $viewpoint5;if ($uid == $postuserid) {$DB_site->query("UPDATE storepoint SET view=$newview where uid=$postuserid");} else{ $DB_site->query("INSERT INTO storepoint (uid, view) VALUES ($postuserid, $newview)");}} } else {

Erwin
02-09-2003, 09:09 PM
Your line 7 should be many different lines really... looks very messy...


{
$DB_site->query("INSERT INTO storepoint (uid, view) VALUES ($postuserid, $newview)");
}
} elseif ($views == $view5) {
$newview = $view + $viewpoint5;
if ($uid == $postuserid) {
$DB_site->query("UPDATE storepoint SET view=$newview where uid=$postuserid");
} else {
$DB_site->query("INSERT INTO storepoint (uid, view) VALUES ($postuserid, $newview)");
}
}
} else {


Try changing that to the above. I think you may have edited and saved in Notepad with WordWrap switched on or something like that, which screws up the formatting. Make sure each { has a } to close it - you may have one too many }.

Peace
02-09-2003, 10:47 PM
Thanks. It's fixed.

Erwin
02-09-2003, 11:15 PM
Great! :)