Special Characters[5165]

08/13/2010 20:39 †he Knight#1
Hello everybody!
Im Looking for help....
You know , on all 5165 Sources you cant use special characters..(§, †... etc)
Can somebody help me about this ... Many ppl are looking for that

Thanks:handsdown:


If you have msn add me at [Only registered and activated users can see links. Click Here To Register...]
08/14/2010 00:23 masternek#2
my friend Fang (who is banned but saw this and wanted to help you) says that it's in the character creation file and to look for where it checks to see if it's a valid name.

also, here is his email: ill PM you his email.
08/14/2010 15:02 .Beatz#3
Go to GameClient.cs and go to the bottom of that cs file. You will see something like
Code:
public bool ValidName(string Name)
{
            if (Name.IndexOfAny(new char[15] { ' ', '~', '[', ']', '#', '*', '\\', '/', '<', '>', ':', '"', '|', '?', '='}) > -1) //this is all windows folder invalids characters
            {
                return false;
            }
            else
            {
                return true;
            }
        }
Thats where you change the special characters that are not allowed
08/15/2010 11:41 Arcо#4
Code:
        public bool ValidName(string name)
        {
            foreach (char ch in name)
            {
                byte c = Convert.ToByte(ch);
                if (!
                    ((c >= 48 && c <= 57) || 
                    (c >= 65 && c <= 90) || 
                    (c >= 97 && c <= 122))
                    )
                    return false;
            }
            return true;
        }
08/15/2010 12:14 kinshi88#5
Can use a regular expression.
Code:
public bool ValidName(string Name) 
{
    return !new Regex("[^a-zA-Z0-9]").IsMatch(Name);
}
08/27/2010 22:47 2087#6
None of your codes worked.. still cant create a char with special characters ;)

at the /accounts form it doesnt show the special characters.... but in the \Character folder it does...
08/27/2010 23:31 Arcо#7
Quote:
Originally Posted by 2087 View Post
None of your codes worked.. still cant create a char with special characters ;)

at the /accounts form it doesnt show the special characters.... but in the \Character folder it does...
Oh he wants it so you CAN?
I gave him a code so you can't do it.
08/28/2010 09:46 2087#8
Ye, i noticed that you CAN'T do it with the codes of you :D

But i'd like to be able to do it :)
Anyhows possible? o.o
08/28/2010 15:55 Arcо#9
Get rid of the validname check in CharacterMaking.cs
08/28/2010 18:09 killersub#10
Quote:
Originally Posted by 2087 View Post
Ye, i noticed that you CAN'T do it with the codes of you :D

But i'd like to be able to do it :)
Anyhows possible? o.o
do wat matty said...go to gameclient.cs

find:

Code:
public bool ValidName(string Name)
and replace ur whole void with mine LOL easiest thing u can do...(I just commented mine wasnt anything hard)

Code:
/*public bool ValidName(string Name)
        {
            if (Name.IndexOfAny(new char[15] { ' ', '~', '[', ']', '#', '*', '\\', '/', '<', '>', ':', '"', '|', '?', '='}) > -1) //this is all windows folder invalids characters
            {
                return false;
            }
            else
            {
                return true;
            }
        }*/
and then do what .Arco said above me.

not hard ^_^.
08/28/2010 18:13 Korvacs#11
Code:
public bool ValidName(string Name)
Right click on valid name and click "Find All References", you will be given a list of all places where that method is used. Then double click each place on the list to be taken to it and remove it.
08/28/2010 19:26 2087#12
Still don't work for me o.o

I'm getting error on that line

Code:
                FileStream FS = new FileStream(@"C:\OldCODB\Users\Characters\" + C.Name + ".chr", FileMode.Open);

... maybe it can't read the special character?
08/28/2010 22:15 Arcо#13
That's exactly WHY that check is needed.
08/29/2010 11:47 2087#14
Ahh i see!
So am i right that it doenst work at all ? :P
08/29/2010 12:47 Korvacs#15
What exception do you receive from it?

If its ArgumentException, then its because of invalid characters in the path.