|
You last visited: Today at 16:14
Advertisement
[Help]Same char. names
Discussion on [Help]Same char. names within the CO2 Private Server forum part of the Conquer Online 2 category.
09/29/2008, 04:44
|
#1
|
elite*gold: 0
Join Date: Jan 2007
Posts: 220
Received Thanks: 63
|
[Help]Same char. names
well i have a problem with the "Char. making" thing, what i mean is...when a person register to my server, and then log in and stuff, make a char. but the char name is already in use, it would still let him make one....it won't show it on the database, and it will fuck both of em, because the guy that worked on his char. for a while will get his char. fucked up, it won't level and it will roll back every time he exit the game, and the other guy won't be able to log in cuz he doesn't have a char. well ok here's the code :
Code:
foreach (string Name in ExternalDatabase.ForbiddenNames)
{
if (CharName == Name)
{
ValidName = false;
break;
}
}
if (CharName.IndexOfAny(new char[3] { ' ', '[', ']' }) > -1)
{
ValidName = false;
}
if (CharName.Length > 10)
{
ValidName = false;
}
try
{
if (ValidName)
{
bool Success = InternalDatabase.CreateCharacter(CharName, Class, Model, Avatar, this);
if (Success)
Console.WriteLine("New character: " + CharName);
Online = false;
MySocket.Disconnect();
}
else
{
Online = false;
MySocket.Disconnect();
}
}
catch
{
return;
}
}
break;
for some reason the
Code:
foreach (string Name in ExternalDatabase.ForbiddenNames)
{
if (CharName == Name)
{
ValidName = false;
break;
}
}
code doesnt work. i tried to change it to "Charr, CharName" and other stuff, but it still didn't work. the rest like "CharName.Length" works perfectly, i use StealArchers source which is PowerSource, so if any one could help me it would be great, thx =)
|
|
|
09/29/2008, 07:11
|
#2
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
|
Quote:
|
foreach (string Name in ExternalDatabase.ForbiddenNames)
|
Use your knowledge of english.
That line checks if the name is any of the ForbiddenNames,such as Tanel,LOTF,GM/PM, etc etc. So,you would have to make a new line,that checks all account names,and character names,hard to explain atm,short on time.
Hope it helped.
Emme
|
|
|
09/29/2008, 17:58
|
#3
|
elite*gold: 20
Join Date: Jan 2008
Posts: 1,042
Received Thanks: 252
|
Quote:
Originally Posted by BlooD-BoY
well i have a problem with the "Char. making" thing, what i mean is...when a person register to my server, and then log in and stuff, make a char. but the char name is already in use, it would still let him make one....it won't show it on the database, and it will **** both of em, because the guy that worked on his char. for a while will get his char. ****** up, it won't level and it will roll back every time he exit the game, and the other guy won't be able to log in cuz he doesn't have a char. well ok here's the code :
Code:
if (CharName.Length > 10)
{
ValidName = false;
}
|
Just abit puzzled here but... isnt the max length of a name 16 not 10?
|
|
|
09/29/2008, 22:02
|
#4
|
elite*gold: 0
Join Date: Jan 2007
Posts: 220
Received Thanks: 63
|
Quote:
Originally Posted by © Haydz
Just abit puzzled here but... isnt the max length of a name 16 not 10?
|
maybe i dunno, but like some times when people make a guild and then i restart server it shows me the following error : System.IndexOutOfRangeException : Index was outside the bounds of the array.
at CO....bla bla bla bla bla XD and it doesnt load the guild, i thought it was umm cuz of the char. names but its not...well but that doesnt concern me, i wanna know how to fix the same char. name first O_O
|
|
|
10/01/2008, 03:10
|
#5
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Quote:
Originally Posted by BlooD-BoY
maybe i dunno, but like some times when people make a guild and then i restart server it shows me the following error : System.IndexOutOfRangeException : Index was outside the bounds of the array.
at CO....bla bla bla bla bla XD and it doesnt load the guild, i thought it was umm cuz of the char. names but its not...well but that doesnt concern me, i wanna know how to fix the same char. name first O_O
|
It's because there's a '~' in one of the char's names, and the server trys to split it by a '~'... Basically it f*k'z up if char's names have ~.
|
|
|
10/01/2008, 14:09
|
#6
|
elite*gold: 0
Join Date: Jan 2007
Posts: 220
Received Thanks: 63
|
Quote:
Originally Posted by tao4229
It's because there's a '~' in one of the char's names, and the server trys to split it by a '~'... Basically it f*k'z up if char's names have ~.
|
well then lets make a command for that :
Code:
if (CharName.IndexOfAny(new char[3] { ' ', '~', '~' }) > -1)
{
ValidName = false;
}
|
|
|
10/01/2008, 21:30
|
#7
|
elite*gold: 0
Join Date: Jan 2007
Posts: 220
Received Thanks: 63
|
sry for double post, but i really need help with this error, its kinda annoying that people make a same name char. and then ppls chars. get ****** up so plx guys any help? O.O
|
|
|
10/01/2008, 23:19
|
#8
|
elite*gold: 20
Join Date: May 2007
Posts: 1,125
Received Thanks: 332
|
Code:
if (CharName.IndexOfAny(new char[4] { ' ', '[', ']', '~' }) > -1)
{
ValidName = false;
}
|
|
|
10/01/2008, 23:29
|
#9
|
elite*gold: 0
Join Date: Jan 2007
Posts: 220
Received Thanks: 63
|
Quote:
Originally Posted by LetterX
Code:
if (CharName.IndexOfAny(new char[4] { ' ', '[', ']', '~' }) > -1)
{
ValidName = false;
}
|
wat does that have to do with the same name problem? O.O
|
|
|
10/01/2008, 23:30
|
#10
|
elite*gold: 20
Join Date: May 2007
Posts: 1,125
Received Thanks: 332
|
Quote:
Originally Posted by BlooD-BoY
wat does that have to do with the same name problem? O.O
|
Oh wait D: I was sort of helping by fixing the code above my original post to disallow "~" =D
|
|
|
 |
Similar Threads
|
[RSRO]Block for meaningless char. names
01/16/2010 - Silkroad Online - 4 Replies
Hi there.
I'm kinda worried because recently I was reading the RSRO news, and I saw this : Silkroad
I know it's not new, but I found some interesting thing.
I transleted with google translate
My char name consists only numbers and underscore. (_)
|
[HELP] Char names
05/07/2009 - CO2 Private Server - 2 Replies
Ok iv seen on LOTF source useing ini files that when a char has ~^| or somthing along that line they get buged:D any ideal why?
|
[Names] All Server Names! Recommended Servers Are Marked!
02/15/2009 - CO2 Private Server - 36 Replies
Hey i saw Many server that are using the same names xD its funny so here is a list to help u out.
Later I Will Make A List With Avaible Names And I Will Put In The (Already In Use) Names What Server Is Dead And What Server Is Alive!
THE BLUE SERVERS ARE RECOMMENDED!
First 1-146 Names That Are In Use!
CoEmu
PorousCO
CoUnleashed
TCWNN
|
char names
06/08/2007 - Conquer Online 2 - 8 Replies
im tryin to use E=MC^2 and it wont let me im getting invalid char. I think it's the "=" giving the problem. Anyone know what to use , like with the space in a name
|
change color of item names or guild names?
05/07/2006 - Conquer Online 2 - 2 Replies
How can i change the color of the item names or guild names? -- they are both yellow and screw up my bot... so i cant be in a guild to us my bot and pick up items.
|
All times are GMT +1. The time now is 16:15.
|
|