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

AAC Znote guilds.php small issue

Manigold

Active Member
Joined
Nov 2, 2017
Messages
197
Solutions
8
Reaction score
47
When i invite more than one character from the same account to the same guild this happens:znote guild.jpg
I believe the problem is in this part:
PHP:
        <?php
        if ($highest_access == 2 || $highest_access == 3) {
            echo '<td>Remove:</td>';
        }
        // Shuffle through visitor characters
        for ($i = 0; $i < $char_count; $i++) {
            $exist = false;
            // Shuffle through invited character, see if they match your character.
            if ($inv_data !== false) foreach ($inv_data as $inv) {
                if ($charactersId[$i] == $inv['player_id']) {
                    $exist = true;
                }
            }
            if ($exist) echo '<td>Join Guild:</td><td>Reject Invitation:</td>';
        }
        ?>
Hope someone can help me, thanks in advance.
 
Solution
Try this:
PHP:
<?php
    if ($highest_access == 2 || $highest_access == 3) {
        echo '<td>Remove:</td>';
    }
    // Shuffle through visitor characters
    $exist = false;
    for ($i = 0; $i < $char_count; $i++) {
        // Shuffle through invited character, see if they match your character.
        if ($inv_data !== false) foreach ($inv_data as $inv) {
            if ($charactersId[$i] == $inv['player_id']) {
                $exist = true;
                break;
            }
        }
    }
    if ($exist) echo '<td>Join Guild:</td><td>Reject Invitation:</td>';
?>
Try this:
PHP:
<?php
    if ($highest_access == 2 || $highest_access == 3) {
        echo '<td>Remove:</td>';
    }
    // Shuffle through visitor characters
    $exist = false;
    for ($i = 0; $i < $char_count; $i++) {
        // Shuffle through invited character, see if they match your character.
        if ($inv_data !== false) foreach ($inv_data as $inv) {
            if ($charactersId[$i] == $inv['player_id']) {
                $exist = true;
                break;
            }
        }
    }
    if ($exist) echo '<td>Join Guild:</td><td>Reject Invitation:</td>';
?>
 
Solution
Try this:
PHP:
<?php
    if ($highest_access == 2 || $highest_access == 3) {
        echo '<td>Remove:</td>';
    }
    // Shuffle through visitor characters
    $exist = false;
    for ($i = 0; $i < $char_count; $i++) {
        // Shuffle through invited character, see if they match your character.
        if ($inv_data !== false) foreach ($inv_data as $inv) {
            if ($charactersId[$i] == $inv['player_id']) {
                $exist = true;
                break;
            }
        }
    }
    if ($exist) echo '<td>Join Guild:</td><td>Reject Invitation:</td>';
?>
Thank you very much, that solved the problem.
 
Back
Top