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

[MYAAC] Guild Error

Solution
Im using Support for Guild Wars for MyAAC 0.8.
Version?
Post automatically merged:

I helped him through AnyDesk.

For some reason, he didn't had this code in system/pages/guilds/show.php

Code:
$twig->display('guilds.view.html.twig', array(
    'guild' => $guild,
    'logo' => $guild_logo,

The 'guild' part was missing.

It's included in 0.8.21, so he probably messed something with the code.
1736975284434.webp
Enable dev mode in config.local.php

$config['env'] = 'dev';

Then you should see the error message.
Post automatically merged:

here is a guilds-after-invited-character.php
LUA:
<?php
defined('MYAAC') or die('Direct access not allowed!');

use Twig\Environment;

require PLUGINS . 'guild-wars-old/init.php';

global $logged;
/**
 * @var OTS_Guild $guild
 * @var bool $isLeader
 * @var OTS_DB_MySQL $db
 * @var Environment $twig
 **/

$guild_id = $guild->getId();

$warFrags = [];
foreach($db->query('SELECT * FROM `guildwar_kills` WHERE `killerguild` = ' . $guild_id . ' OR `targetguild` = ' . $guild_id . ' ORDER BY `time` DESC')->fetchAll() as $frag) {
    $warFrags[$frag['warid']][] = $frag;
}

$warsDb = $db->query('SELECT `guild_wars`.`id`, `guild_wars`.`guild1`, `guild_wars`.`guild2`, ' . $extraQuery . '`guild_wars`.`status`, (SELECT COUNT(1) FROM `guildwar_kills` WHERE `guildwar_kills`.`warid` = `guild_wars`.`id` AND `guildwar_kills`.`killerguild` = `guild_wars`.`guild1`) guild1_kills, (SELECT COUNT(1) FROM `guildwar_kills` WHERE `guildwar_kills`.`warid` = `guild_wars`.`id` AND `guildwar_kills`.`killerguild` = `guild_wars`.`guild2`) guild2_kills FROM `guild_wars` WHERE `guild1` = ' . $guild_id . ' OR `guild2` = ' . $guild_id . ' ORDER BY CASE `status` WHEN 0 THEN 2 WHEN 1 THEN 1 WHEN 4 THEN 3 WHEN 3 THEN 4 WHEN 2 THEN 5 END, `' . $orderBy . '` DESC')->fetchAll();

displayGuildWars($warsDb, $warFrags, $guild, $isLeader);
Post automatically merged:

@slaw
 
Last edited:
Do you have this line in system/templates/guilds.view.html.twig:

{{ hook('HOOK_GUILDS_AFTER_INVITED_CHARACTERS', { 'guild': guild, 'isLeader': isLeader }) }}

?

Also, would be useful to know, what myaac version do you use, you can see that in common.php
 
Do you have this line in system/templates/guilds.view.html.twig:

{{ hook('HOOK_GUILDS_AFTER_INVITED_CHARACTERS', { 'guild': guild, 'isLeader': isLeader }) }}

?

Also, would be useful to know, what myaac version do you use, you can see that in common.php
I am using the 0.8.21 version of myaac, i already have that line
 
Im using Support for Guild Wars for MyAAC 0.8.
Version?
Post automatically merged:

I helped him through AnyDesk.

For some reason, he didn't had this code in system/pages/guilds/show.php

Code:
$twig->display('guilds.view.html.twig', array(
    'guild' => $guild,
    'logo' => $guild_logo,

The 'guild' part was missing.

It's included in 0.8.21, so he probably messed something with the code.
 
Last edited:
Solution
Back
Top