• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Website Highscore Problem

kozmo

Member
Joined
Jan 30, 2009
Messages
433
Solutions
2
Reaction score
22
In C:\xampp\htdocs\pot/OTS_Account , I guess thats were the problem is and this is the error message i get when i try to goto the highscores page.

Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\pot\OTS_Account.php on line 445

If anyone knows how to fix this please do let me know.
 
Post the contents of C:\xampp\htdocs\pot\OTS_Account.php here, and tell us what line 445 is...
Before you do that, get rid of xampp and start using uniserver.
 
This is what it looks like.
value = $this->db->query('SELECT ' . $this->db->fieldName($field) . ' FROM ' . $this->db->tableName('accounts') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id'])->fetch();
 
Try to put a $ before value:
$value = $this->db->query('SELECT ' . $this->db->fieldName($field) . ' FROM ' . $this->db->tableName('accounts') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id'])->fetch();

Otherwise post the surrounding few lines as well.
 
$value = $this->db->query('SELECT ' . $this->db->fieldName($field) . ' FROM ' . $this->db->tableName('accounts') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id'])->fetch();

I added the money sign because i thought it would fix the problem but it did not so can someone tell me whats wrong with this line here?
Thanks
 
public function getCustomField($field)
{
if( !isset($this->data['id']) )
{
throw new E_OTS_NotLoaded()


$value = $this->db->query('SELECT ' . $this->db->fieldName($field) . ' FROM ' . $this->db->tableName('accounts') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id'])->fetch();
return $value[$field];
}


public function setCustomField($field, $value)
{
if( !isset($this->data['id']) )
{
throw new E_OTS_NotLoaded();
}
Thats line 438 to 455.
 
Back
Top