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

[Modern AAC ] Error create Guilds

GM SoftCores

Member
Joined
Jun 3, 2008
Messages
149
Reaction score
8
Error : Guild name is already taken.

I put all names for test guild and only put Guild name is already taken.


Please need help fast

guild model: guilds model php

Guild.php : guilds php
 
I know this is a very old thread, but i had this problem too until 5 minutes ago and maybe i would not be the only one in the future who will. I never learned PHP but i just found the problem with my knowledge of Visual C#.

If the function _checkGuildName in your guilds.php looks like this:
PHP:
    public function _checkGuildName($name){
        $this->load->model("guilds_model");
        if($this->guilds_model->checkGuildName($name)) {
            return true;
        }
        else {
            $this->form_validation->set_message('_checkGuildName', 'Guild name is already taken.');
            return false;
        }
    }

simply trade this one:
PHP:
return true;

with this one:
PHP:
$this->form_validation->set_message('_checkGuildName', 'Guild name is already taken.');
            return false;

At the end the function has to look like this:
PHP:
    public function _checkGuildName($name){
        $this->load->model("guilds_model");
        if($this->guilds_model->checkGuildName($name)) {
            $this->form_validation->set_message('_checkGuildName', 'Guild name is already taken.');
            return false;
        }
        else {
            return true;
        }
    }

The error occurs because the function checkGuildName in guilds_model.php says if the name already exists return TRUE and the old _checkGuildName in guilds.php said if it returns FALSE say "Guild name is already taken." ;)

Feel loved by me, Leyla.
 
Back
Top