Quote:
Originally Posted by Kiyono
I don't know, didn't try it with this source. Tried breakpointing? And just to be sure you did use it in this format right? /account <username> <password>
|
Just got home so i'll try breakpointing now. And yeah i did it in that format.
#EDIT
Alright well nothing happened when i used breakpoints.
Maybe i messed up something in one of the codes?
My command:
case "/account":
{
Database.NewUsername(args[1], args[2]);
break;
}
NewUsername void:
public static void NewUsername(string Username, string Password)
{
IniFile wrtr = new IniFile(DatabasePath + @"\Accounts\" + Username + ".ini");
if (File.Exists(wrtr.FileName))
{
Console.WriteLine("Username is taken.");
}
else
{
wrtr.Write("Account", "Username", Username);
wrtr.Write("Account", "Password", Password);
wrtr.Write("Character", "Name", "INVALIDNAME");
DirectoryInfo info = new DirectoryInfo(DatabasePath + @"\Accounts\");
wrtr.Write("Character", "UID", "1000000" + info.GetFiles().Length);
wrtr.Write("Character", "GM", "2");
Console.WriteLine("Account was successfully created.");
}
}
P.S sorry i don't know how to make spoilers :/