Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 21:08

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

Advertisement



help deleting character from 5165?

Discussion on help deleting character from 5165? within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2006
Posts: 10
Received Thanks: 0
help deleting character from 5165?

public static void DeleteCharacter(string Name)
{
File.Delete(@"C:\OldCODB\Users\Characters\" + Name + ".chr");
MySqlCommand Cmd = new MySqlCommand("UPDATE accounts SET EntityName = '' WHERE EntityName = '" + Name + "'", DatabaseConnection.Connection);
Cmd.ExecuteNonQuery();
}

Is the code. "The name 'DatabaseConnection' does not exist in the current context."
any help would be appreciated
joshuamns is offline  
Old 03/06/2012, 08:32   #2
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
If the character data is being saved to a file, why is your account data being saved to MySQL? Are you using files for your accounts or MySQL? (NewestCoServer doesn't use MySQL, but you didn't specify what source you're using).
Spirited is offline  
Old 03/06/2012, 20:16   #3
 
diedwarrior's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 611
Received Thanks: 195
File.Delete(@"C:\OldCODB\Users\Characters\" + Name + ".chr"), obviously he's not using mysql....
diedwarrior is offline  
Old 03/06/2012, 20:23   #4
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
Quote:
Originally Posted by diedwarrior View Post
File.Delete(@"C:\OldCODB\Users\Characters\" + Name + ".chr"), obviously he's not using mysql....
That's completely unrelated. Character data != account data.
Spirited is offline  
Old 03/06/2012, 20:28   #5
 
Nyorai's Avatar
 
elite*gold: 200
Join Date: Sep 2011
Posts: 202
Received Thanks: 107
Fang sorry for the off-topic reply but, could you please check my thread?
I'm having some trouble figuring it out
Nyorai is offline  
Old 03/06/2012, 20:32   #6
 
elite*gold: 0
Join Date: Dec 2006
Posts: 10
Received Thanks: 0
im not using Mysql (i tried to follow this. but as ive said im having a problem um. the source im using is from here
joshuamns is offline  
Old 03/07/2012, 00:06   #7
 
Lateralus's Avatar
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 918
Quote:
Originally Posted by joshuamns View Post
im not using Mysql (i tried to follow this. but as ive said im having a problem um. the source im using is from here
If you're not using MySQL, then why are you attempting to send MySQL commands?
Lateralus is offline  
Old 03/07/2012, 00:12   #8
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
Quote:
Originally Posted by Lateralus View Post
If you're not using MySQL, then why are you attempting to send MySQL commands?
^
Exactly.

Just take out the mysql command and make sure that you're updating the account file as well. There's more to this but... oh well. Basic functionality is still functionality.
Spirited is offline  
Old 03/07/2012, 02:21   #9
 
U2_Caparzo's Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 314
Received Thanks: 90
look like he copied the code from another source with mysql
for delete char u just need what u have
File.Delete(@"C:\OldCODB\Users\Characters\" + Name + ".chr");
U2_Caparzo is offline  
Old 03/07/2012, 02:27   #10
 
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
lmao the other source is using a mysql database not a ini/txt , btw i guess u want to delete a single char not all of them , right ? else u was to delete the file manually o-0
well here where u got it from
Quote:
public static void DeleteCharacter(string Name)
{
File.Delete(@"C:\OldCODB\Users\Characters\" + Name + ".chr");
MySqlCommand Cmd = new MySqlCommand("UPDATE accounts SET EntityName = '' WHERE EntityName = '" + Name + "'", DatabaseConnection.Connection);
Cmd.ExecuteNonQuery();
}
Quote:
if(File.Exist(@"C:\OldCODB\Users\Characters\" + Name + ".chr"))
iunno what is this about , well the second quote is a check if that file exist
and the first part from first quote delete a file (which i guess contains char(s))
and second part updated the mysql accounts list
weirdo , should made both in mysql database
anyway
Quote:
Is the code. "The name 'DatabaseConnection' does not exist in the current context.
do u miss a reference (do u miss adding a dll as reference ?)
or u r not using mysql at all ?
lol i still cant figure out what's wrong , im shooting in dark but yeah that will never work till u have 2 files one txt got char and one mysql got accounts -.-
injection illusion logic is offline  
Old 03/07/2012, 06:48   #11
 
elite*gold: 0
Join Date: Dec 2006
Posts: 10
Received Thanks: 0
nah im not using mysql lol. and ive tried without the mysql command like some people have suggested and still no luck. same problem
joshuamns is offline  
Old 03/07/2012, 06:50   #12
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
Quote:
Originally Posted by joshuamns View Post
nah im not using mysql lol. and ive tried without the mysql command like some people have suggested and still no luck. same problem
If you remove it, how are you getting the same problem? Do you have a screenshot of the error message? Are you building the project?
Spirited is offline  
Old 03/07/2012, 07:57   #13
 
elite*gold: 0
Join Date: Dec 2006
Posts: 10
Received Thanks: 0
i have no idea how im getting the problem still. and tomorrow afternoon i'll take a screeny of it. (and it wont let me build it because of the error)
i dont think it would matter if im using Visual Studio 11 Beta does it?

nvm i got it thanks somehow one of the lines got pasted more than once >.< i feel like an idiot haha.
joshuamns is offline  
Old 03/07/2012, 14:54   #14
 
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
omg lol
injection illusion logic is offline  
Old 03/08/2012, 00:32   #15
 
U2_Caparzo's Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 314
Received Thanks: 90
Quote:
Originally Posted by injection illusion logic View Post
lmao the other source is using a mysql database not a ini/txt , btw i guess u want to delete a single char not all of them , right ? else u was to delete the file manually o-0
well here where u got it from

do u miss a reference (do u miss adding a dll as reference ?)
or u r not using mysql at all ?
lol i still cant figure out what's wrong , im shooting in dark but yeah that will never work till u have 2 files one txt got char and one mysql got accounts -.-
just a NCOs source, with a code copied and pasted from a... hmmm maybe trinity source or any impulse updated so he dont have the file or dll called DatabaseConnection...
U2_Caparzo is offline  
Reply


Similar Threads Similar Threads
[5165] character Already in Use problem!
09/14/2011 - CO2 Private Server - 4 Replies
Anyone familiar this problem? when someone not properly exited, like adjusting the sreen size the character didnt log out. but the game disappear. and the account is always online...
Change character name 5165
05/22/2010 - CO2 Private Server - 25 Replies
Does anybody know how i can delete and change character names in the 5165 client? thanks :)
Character settings for 5165
02/15/2010 - CO2 Private Server - 3 Replies
This is why I like use Navicat for mySql better lol.. how can I make it so that when a new char is made and he logs in he will have, let's say 50 cps?
[question] deleting character
02/01/2009 - Dekaron Private Server - 4 Replies
How to delete character? when i press delete I need to write something. What must be written in there? thx
Anyway to bypass the warehouse for deleting a character
09/24/2007 - Conquer Online 2 - 9 Replies
as the title says is there any known way of bypassing the warehouse to delete a character without the warehouse pass? or a program to do so, thanks :)



All times are GMT +2. The time now is 21:08.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.