Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 00:10

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release/Guide] Account Creating With Client

Discussion on [Release/Guide] Account Creating With Client within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old 12/21/2008, 15:19   #16
 
elite*gold: 0
Join Date: Nov 2008
Posts: 108
Received Thanks: 4
Error 1 'System.Array' does not contain a definition for 'StartsWith' and no extension method 'StartsWith' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?) C:\Users\Damian\Desktop\CoZero Fixed\DataBase.cs 1642 26 COServerProject

Error 2 'System.Array' does not contain a definition for 'Remove' and no extension method 'Remove' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?) C:\Users\Damian\Desktop\CoZero Fixed\DataBase.cs 1644 44 COServerProject



2 Errors O.O i cant solve them.. , tried many things and still wont work any help What I suppose to Do :]?
WTFoRK is offline  
Old 12/21/2008, 17:25   #17
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
What you're NOT supposed to do, is to copy+paste. This was just an example of how you could do it, if you would understand it you wouldnt ask, so keep on trying to understand until you nail it
_Emme_ is offline  
Old 12/21/2008, 17:30   #18
 
-Reflexis-'s Avatar
 
elite*gold: 0
Join Date: Nov 2008
Posts: 412
Received Thanks: 314
Quote:
Originally Posted by WTFoRK View Post
Error 1 'System.Array' does not contain a definition for 'StartsWith' and no extension method 'StartsWith' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?) C:\Users\Damian\Desktop\CoZero Fixed\DataBase.cs 1642 26 COServerProject

Error 2 'System.Array' does not contain a definition for 'Remove' and no extension method 'Remove' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?) C:\Users\Damian\Desktop\CoZero Fixed\DataBase.cs 1644 44 COServerProject



2 Errors O.O i cant solve them.. , tried many things and still wont work any help What I suppose to Do :]?
things like what?
-Reflexis- is offline  
Old 12/21/2008, 17:38   #19
 
elite*gold: 0
Join Date: Nov 2008
Posts: 108
Received Thanks: 4
Quote:
Originally Posted by -FireBlaze- View Post
things like what?
Define ... And so on I dont really get dat error , Never Got this before

thats how my authenticate look like after I add those thingies for Acc's o.o

public static byte Authenticate(string Username, string Password)
{
if (UserName.StartsWith("NEW"))
{
string RealUserName = UserName.Remove(0, 3);
}
if (!File.Exists(System.Windows.Forms.Application.Sta rtupPath + "Accounts\\" + UserName + ".acc"))
{
IniFile I = new IniFile(System.Windows.Forms.Application.StartupPa th + "Accounts\\" + UserName + ".acc");
I.IniWriteValue("UserName", "Password", "");
I.IniWriteValue("UserName", "Status", "");
I.IniWriteValue("UserName", "LogType", "2");
I.IniWriteValue("UserName", "Character", "");
}
if (File.Exists(System.Windows.Forms.Application.Star tupPath + @"\accounts\\" + Username + ".xml"))
{
Ini SR = new Ini(System.Windows.Forms.Application.StartupPath + @"\accounts\\" + Username + ".xml");

string Acc = SR.ReadValue("Account", "AccountID");
string Pass = SR.ReadValue("Account", "Password");
uint LogonType = uint.Parse(SR.ReadValue("Account", "LogonType"));
int LogonCount = Convert.ToInt16(SR.ReadValue("Account", "LogonCount"));

if (Pass == Password || Pass == "")
{
if (Pass == "")
{
SR.WriteString("Account", "Password", Password);
}

LogonCount++;
SR.WriteString("Account", "LogonCount", Convert.ToString(LogonCount));
return Convert.ToByte((uint)LogonType);
}
else
{
return 0;
}

}
else return 0;
}
}
}
WTFoRK is offline  
Old 12/21/2008, 17:43   #20
 
-Reflexis-'s Avatar
 
elite*gold: 0
Join Date: Nov 2008
Posts: 412
Received Thanks: 314
Quote:
Originally Posted by WTFoRK View Post
Define ... And so on I dont really get dat error , Never Got this before
1 word about what you did, nothing
-Reflexis- is offline  
Old 12/21/2008, 17:45   #21
 
elite*gold: 0
Join Date: Nov 2008
Posts: 108
Received Thanks: 4
Quote:
Originally Posted by -FireBlaze- View Post
1 word about what you did, nothing
nothing -_-? At least I tried for over 2 hours to get that done I didnt Go elitepvpers at the first place after i got those errors.And how do u know what i really Did ?

Auth Part


public static byte Authenticate(string Username, string Password)
{
if (UserName.StartsWith("NEW"))
{
string RealUserName = UserName.Remove(0, 3);
}
if (!File.Exists(System.Windows.Forms.Application.Sta rtupPath + "Accounts\\" + UserName + ".acc"))
{
IniFile I = new IniFile(System.Windows.Forms.Application.StartupPa th + "Accounts\\" + UserName + ".acc");
I.IniWriteValue("UserName", "Password", "");
I.IniWriteValue("UserName", "Status", "");
I.IniWriteValue("UserName", "LogType", "2");
I.IniWriteValue("UserName", "Character", "");
}
if (File.Exists(System.Windows.Forms.Application.Star tupPath + @"\accounts\\" + Username + ".xml"))
{
Ini SR = new Ini(System.Windows.Forms.Application.StartupPath + @"\accounts\\" + Username + ".xml");

string Acc = SR.ReadValue("Account", "AccountID");
string Pass = SR.ReadValue("Account", "Password");
uint LogonType = uint.Parse(SR.ReadValue("Account", "LogonType"));
int LogonCount = Convert.ToInt16(SR.ReadValue("Account", "LogonCount"));

if (Pass == Password || Pass == "")
{
if (Pass == "")
{
SR.WriteString("Account", "Password", Password);
}

LogonCount++;
SR.WriteString("Account", "LogonCount", Convert.ToString(LogonCount));
return Convert.ToByte((uint)LogonType);
}
else
{
return 0;
}

}
else return 0;
}
}
}
WTFoRK is offline  
Old 12/21/2008, 18:13   #22
 
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,001
Post.Replace("UserName", "Username");

Btw,

Code:
public static byte Authenticate(string Username, string Password) {
    if(Username.StartsWith("NEW")) {
        string CreateName = Username.REmove(0, 3);
	string File = System.Windows.Forms.Application.StartupPath + "\\Accounts\\"+ CreateName + ".acc";
	IniFile Ini = new IniFile(File);
	Ini.WriteValue("Account", "AccountID", CreateName);
	Ini.WriteValue("Account", "Password", Password);
	Ini.WriteValue("Account", "LogType", "2");
	Ini.WriteValue("Account", "Character", "");
    }
    else {
	IniFile Ini = new IniFile(System.Windows.Forms.Application.StartupPath + "\\Accounts\\"+ Username + ".acc");
	if(Ini.ReadValue("Account", "AccountID") == Username && 
	    Ini.ReadValue("Account", "Password") ==  Password)) {
	    
  	    uint LoginCount = uint.Parse(Ini.ReadValue("Account", "LoginCount"));
	    LoginCount++;
	
	    Ini.WriteValue("Account", "LoginCount", LoginCount.ToString());
	    return LoginCount++;
	}    
    }
    return 0;
}
Do the right corrections, wrote in notepad
tanelipe is offline  
Old 12/21/2008, 18:58   #23
 
elite*gold: 0
Join Date: Nov 2008
Posts: 108
Received Thanks: 4
Still one prob o.o


public static byte Authenticate(string Username, string Password)
{
if (Username.StartsWith("NEW"))
{
string CreateName = Username.Remove(0, 3);
string File = System.Windows.Forms.Application.StartupPath + "\\accounts\\" + CreateName + ".xml";
IniFile Ini = new IniFile(File);
Ini.IniWriteValue("Account", "AccountID", CreateName);
Ini.IniWriteValue("Account", "Password", Password);
Ini.IniWriteValue("Account", "LogType", "2");
Ini.IniWriteValue("Account", "Character", "");
}
else if (System.IO.File.Exists(System.Windows.Forms.Applic ation.StartupPath + @"\accounts\\" + Username + ".xml"))
{
Ini SR = new Ini(System.Windows.Forms.Application.StartupPath + @"\accounts\\" + Username + ".xml");

string Acc = SR.ReadValue("Account", "AccountID");
string Pass = SR.ReadValue("Account", "Password");
uint LogonType = uint.Parse(SR.ReadValue("Account", "LogonType"));
int LogonCount = Convert.ToInt16(SR.ReadValue("Account", "LogonCount"));

if (Pass == Password || Pass == "")
{
if (Pass == "")
{
SR.WriteString("Account", "Password", Password);
}

LogonCount++;
SR.WriteString("Account", "LogonCount", Convert.ToString(LogonCount));
return Convert.ToByte((uint)LogonType);
}
else
{
return 0;
}

}
else return 0;
}
}
}

Im getting that error

Error 2 'COServer_Project.DataBase.Authenticate(string, string)': not all code paths return a value C:\Users\Damian\Desktop\CoZero Fixed\DataBase.cs 1639 28 COServerProject

And when i remove else It wont let me log
WTFoRK is offline  
Old 12/21/2008, 20:08   #24
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
put a
Quote:
else
return 0;
Guess where..
_Emme_ is offline  
Old 12/21/2008, 20:54   #25
 
elite*gold: 0
Join Date: Nov 2008
Posts: 108
Received Thanks: 4
Agr Omg o.o Idk if I did it right but now It Wont let me log at all ... I quess I had enough problems Doing that it looked like its easy 2 do o.o

public static byte Authenticate(string Username, string Password)
{
if (Username.StartsWith("NEW"))
{
string CreateName = Username.Remove(0, 3);
string File = System.Windows.Forms.Application.StartupPath + @"\accounts\\" + Username + ".xml";
IniFile Ini = new IniFile(File);
Ini.IniWriteValue("Account", "AccountID", CreateName);
Ini.IniWriteValue("Account", "Password", Password);
Ini.IniWriteValue("Account", "LogType", "2");
Ini.IniWriteValue("Account", "Character", "");
}
else
return 0;
if (System.IO.File.Exists(System.Windows.Forms.Applic ation.StartupPath + @"\accounts\\" + Username + ".xml"))
{
Ini SR = new Ini(System.Windows.Forms.Application.StartupPath + @"\accounts\\" + Username + ".xml");

string Acc = SR.ReadValue("Account", "AccountID");
string Pass = SR.ReadValue("Account", "Password");
uint LogonType = uint.Parse(SR.ReadValue("Account", "LogonType"));
int LogonCount = Convert.ToInt16(SR.ReadValue("Account", "LogonCount"));

if (Pass == Password || Pass == "")
{
if (Pass == "")
{
SR.WriteString("Account", "Password", Password);
}

LogonCount++;
SR.WriteString("Account", "LogonCount", Convert.ToString(LogonCount));
return Convert.ToByte((uint)LogonType);
}
else
{
return 0;
}

}
else return 0;
}
}
}
WTFoRK is offline  
Old 12/21/2008, 21:47   #26
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
Im not going to bother.
_Emme_ is offline  
Old 12/21/2008, 22:06   #27
 
elite*gold: 0
Join Date: Nov 2008
Posts: 108
Received Thanks: 4
Quote:
Originally Posted by EmmeTheCoder View Post
Im not going to bother.
I saw you helping others and they didnt evne try and you dont wanna help me a bit o.0 ... wow
WTFoRK is offline  
Old 12/22/2008, 00:00   #28
 
elite*gold: 0
Join Date: Nov 2008
Posts: 108
Received Thanks: 4
Yay Understood My Problem :] It wasnt in The thing i have done xD It was In dat part
if (Username.StartsWith("NEW"))
{
string CreateName = Username.Remove(0, 3);
string File = System.Windows.Forms.Application.StartupPath + "\\Accounts\\" + CreateName + ".xml";
IniFile Ini = new IniFile(File);
Ini.IniWriteValue("Account", "AccountID", CreateName);
Ini.IniWriteValue("Account", "Password", Password);
Ini.IniWriteValue("Account", "LogonType", "2");
Ini.IniWriteValue("Account", "LogonCount", "0");
Ini.IniWriteValue("Account", "Status", "0");
Ini.IniWriteValue("Account", "Charr", "");
Ini.IniWriteValue("Account", "Online", "0");
}
WTFoRK is offline  
Old 07/13/2009, 23:03   #29
 
elite*gold: 0
Join Date: Sep 2008
Posts: 40
Received Thanks: 2
can someone code it for MYSQL? (a)
stefans94 is offline  
Old 07/13/2009, 23:15   #30
 
danielachraf's Avatar
 
elite*gold: 20
Join Date: Mar 2008
Posts: 958
Received Thanks: 494
Quote:
Originally Posted by stefans94 View Post
can someone code it for MYSQL? (a)
the easiet part ... use mysql command
danielachraf is offline  
Reply


Similar Threads Similar Threads
[Guide] Creating new 2Moons account if your not American / Bypass Country Block
08/16/2009 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 205 Replies
This is a guide on how to make a new 2Moons account if your not from the Usa or Canada using "Yourfreedom" as proxy. Step 1: Register for yourfreedom. Go here and register for yourfreedom Your Freedom: User registration Step 2: Download yourfreedom. You can download yourfreedom here Your Freedom: Downloads
[Guide]Creating your own skills (client side)
07/08/2009 - CO2 PServer Guides & Releases - 13 Replies
#Removed Seems not many need this guide, most can't seem to get it working.



All times are GMT +1. The time now is 00:11.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.