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

Geisor ACC. Maker

djlucas15

New Member
Joined
Feb 18, 2008
Messages
99
Reaction score
0
Location
RS - Brasil
Correct link: /?subtopic=guilds&action=show&guild=39
Bugged link: /?subtopic=guilds&action=show&guild=Elite Of Extreme

The Following Errors Have Occurred:
# Guild with ID 0 doesn't exist.

How to fix?
 
The error is most likely because the code was done to take the guild ID and return information from that, not the name.
And thus since a string equals to "0" in mathematical terms, the code tries to find a guild with the id "0", and as you can see that ain't working.

To fix it you would most likely have to edit the PHP code so that it takes the name rather than the ID of the guild.
 
This will fix the GUILD ID ERROR. ;)

Open characters.php
Goto line: 68

Replace this:
{
$guild_name = $rank_of_player->getGuild()->getName();
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Guild membership:</TD><TD>'.$rank_of_player->getName().' of the <a href="?subtopic=guilds&action=show&guild='.$guild_name.'">'.$guild_name.'</a></TD></TR>';
}


With this:

{
$guild_id = $rank_of_player->getGuild()->getId();
$guild_name = $rank_of_player->getGuild()->getName();
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Guild membership:</TD><TD>'.$rank_of_player->getName().' of the <a href="?subtopic=guilds&action=show&guild='.$guild_id.'">'.$guild_name.'</a></TD></TR>';
}
 
Back
Top