Register for your free account! | Forgot your password?

You last visited: Today at 17:12

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

Advertisement



Database.cs Error?

Discussion on Database.cs Error? within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2007
Posts: 187
Received Thanks: 45
Database.cs Error?

Well I get my friends playing my server and I'm getting this alot. This therefore isn't saving them. They also DC alot but maybe thats more to do with my conenction.

and inside line 1183 is the save char region.
Andrew.A is offline  
Old 12/13/2009, 00:32   #2
 
Tw3ak's Avatar
 
elite*gold: 20
Join Date: Jun 2005
Posts: 1,489
Received Thanks: 301
I won't tell ya how to fix it but i'll point you in the right direction
The problem is the reader in the source is flawed because the reader doesn't always close when reading/writing info so it starts throwin errors when it tries to read or write info to a persons character and it can't because it hasn't closed after reading/writing a previous file. This is the bug i was laughin about on darksideco and posted about it a week or 2 back in this same source, Because people would play hours and log off or dc'd and reconnected and had lost everything they did because the reader didn't save anything.
Tw3ak is offline  
Old 12/13/2009, 05:18   #3
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
A filestream to the character files as Tw3ak said isn't being closed. It's good practice to close all streams when you're done with them unless documentation says otherwise. If your using a short lived stream and don't wish to call Close() you can do something like this:

Code:
using (StreamReader rdr = new StreamReader(...))
{
// code here, after this scope is executed,
// the rdr variable will be disposed and no longer be accessible
}
InfamousNoone is offline  
Reply


Similar Threads Similar Threads
Database.cs Error
06/17/2010 - CO2 Private Server - 6 Replies
Can someone help me fix this error in red? public double ReadDouble(string Section, string Key) { string section = ""; IniSectionStructure ISS = null; Sections.TryGetValue(section, out ISS); if (ISS != null) { IniValueStructure IVS = null;
[Help] SQL Error with DataBase
10/29/2009 - Aion - 0 Replies
Hey im working on my Server and i think i have everything working but when i run the Sql to add my database to navicat it says there is an error :( If someone can help me add me on msn please and thank you. [email protected]
Error MySQL Connection and New Database
11/24/2008 - CO2 Private Server - 8 Replies
My first problem: I'm trying to remake another server using LOTF this time, but now when I try to open up the localhost connection in MySQL I get this error: 2003 - Can't connect to MySQL server on 'localhost' (10016). I remember this error happened to me before as well, but I forget what exactly I did to fix it because it was working later on. If I can't open the connection then I can't make a new database. My second problem: When I go here "http://localhost/phpmyadmin" The page cannot be...
[HELP] DataBase Error
09/12/2008 - CO2 Private Server - 1 Replies
http://img261.imageshack.us/img261/739/databaseerr ortw9.png İ use Steals Server Pack What is wrong here ?? -- phpMyAdmin SQL Dump -- version 2.10.3 -- http://www.phpmyadmin.net --
wbblite sql database error
09/10/2008 - Technical Support - 0 Replies
huh, ich hab seit heute das problem dass ich in meinem forum weder neue threats erstellen, noch replys posten kann.. verändert habe ich zur zeit nichts, aber ich hörte dass es gestern mal nen kurzen serverdown gab :o SQL-DATABASE ERROR Database error in WoltLab Burning Board: Invalid SQL: INSERT INTO bb1_posts (parentpostid,threadid,userid,username,iconid,post topic,posttime,message,allowsmilies,showsignature, ipaddress,visible) VALUES...



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


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.