• 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!

Problem with guilds.php

beybus

New Member
Joined
Oct 2, 2010
Messages
110
Reaction score
2
Hi guys,
When i create guild and click 'show' i've got an error:

Fatal error: Method OTS_Player::__toString() must not throw an exception in /home/www/acc/acc737/guilds.php on line 2200

Any suggestions to fix it?
 
Thx for answer, i've found a reason: i checked in database and when i create guild it automatically gets 'world_id 1' cause my world's id is 1.
But accmaker see only guilds with 'world_id = 0'
Any ideas?
 
I think yes, but can u show me exactly verse with this param, cause i'm not sure 'bout this.
Im always going to set my world_id = 1 and it works for ex. in highscores i've got- $world_id = 1; and it works
also in guilds.php i've changed it to 1 but accmaker see only guilds with world_id = 0.
 
PHP:
$config['site']['worlds'] = array(0 => 'Server Name');
but if you already forced it to be 1, this won't affect anything
 
replace
Code:
	$main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD></TD><TD>
<FORM ACTION="" METHOD=get><INPUT TYPE=hidden NAME=subtopic VALUE=guilds><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>World Selection</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'">
    <TABLE BORDER=0 CELLPADDING=1><TR><TD>World: </TD><TD><INPUT TYPE=hidden NAME=subtopic VALUE=guilds><SELECT SIZE="1" NAME="world"><OPTION VALUE="" SELECTED>(choose world)</OPTION>';
	foreach($config['site']['worlds'] as $id => $world_n)
{
	$main_content .= '<OPTION VALUE="'.$id.'">'.$world_n.'</OPTION>';
}
	$main_content .= '</SELECT> </TD><TD><INPUT TYPE=image NAME="Submit" ALT="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif">
        </TD></TR></TABLE></TABLE></FORM></TABLE>';
		foreach($config['site']['worlds'] as $idd => $world_n)
		{
			if($idd == (int) $_REQUEST['world'])
			{
				$world_id = $idd;
				$world_name = $world_n;
			}
		}
	if(!isset($world_id))
	{
		$world_id = 0;
		$world_name = $config['server']['serverName'];
	}
	$filter = new OTS_SQLFilter();
	$filter->compareField('world_id', (int) $world_id);
	$guilds_list = $ots->createObject('Guilds_List');
	$guilds_list->setFilter($filter);
	$guilds_list->orderBy('name');
with
Code:
	$world_id = 1;
	$world_name = $config['server']['serverName'];
	$guilds_list = $ots->createObject('Guilds_List');
	$guilds_list->orderBy('name');
and correct the number if necessary
 
Back
Top