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

Short words, creating a character

hepy

New Member
Joined
Aug 15, 2007
Messages
217
Reaction score
1
Hi, when i try to create a character and i use short words like "Go" i get this error:
Code:
The Player Name field must contain a valid string.
The thing is i need that it allows players to put short words in their names, cause is very used in spanish. I need that players can create character with names like "Go Asdasd".

any idea? thanks :)
 
Which trunk are you using? How did you download this version?

Because I don't really remember this kind of error message in v1 but exactly same in v2 which shouldn't be used for now.

However, nickname "Go" is wrong anyway? Isn't it too short?
 
yes i know but i want that players can use names like "El Cazador", and now they can choose only "Elcazador" or "Cazador" the problem is the word "El" cause is too short.
i download the complete trunk from the official modern svn, and i also updated a few days the new files because someone uploaded new edited files
 
Why :( is there a way to change this? i dont really find it useful =/
 
system/libraries/Form_validation.php

search for:
PHP:
        function nickname($str)
        {
                $a = explode(' ', $str);
                $error = 0;
                foreach($a as $b)
                        if(!preg_match("/^[a-zA-Z]{3}+(([\'\-][a-zA-Z]{2})?[a-zA-Z]*)*$/", $b))
                                $error++;
                                
                return $error ? FALSE : TRUE;
        }

change to:
PHP:
        function nickname($str)
        {
                $a = explode(' ', $str);
                $error = 0;
                foreach($a as $b)
                        if(!preg_match("/^[a-zA-Z]{2}+(([\'\-][a-zA-Z]{2})?[a-zA-Z]*)*$/", $b))
                                $error++;
                                
                return $error ? FALSE : TRUE;
        }
 
Back
Top