Register for your free account! | Forgot your password?

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

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

Advertisement



Need Auto Save Code for 5165

Discussion on Need Auto Save Code for 5165 within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 09/10/2010, 22:23   #16
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
So you're waiting for us todo everything for you?
Sorry,but with most of us in the community,that won't fly.
Arcо is offline  
Old 09/10/2010, 22:43   #17
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 506
Quote:
Originally Posted by pro4never View Post
Or better yet... save the modified sections every time they are changed.

If not your server will ALWAYS be exploitable and ALWAYS have rollbacks (of differing sizes)
This is wrong.
Saving every modified section every time it changes will not make your server less 'exploitable', neither will you have less rollbacks.

All that really matters is correctly handling the load of saving, things like safe-threading is important.

Unless your server 'forgets' data, saving it will not make a difference. It is already saved, its just not permanent, so make you sure you make it permanent at some time, and make sure your server does not close before this has happened.
Basser is offline  
Old 09/10/2010, 23:20   #18
 
elite*gold: 0
Join Date: Jul 2010
Posts: 223
Received Thanks: 23
I uploaded my old source edit...
You can download it if you want. I did my best to fix the rollback problem:
-Fáng- is offline  
Old 09/10/2010, 23:51   #19


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Quote:
Originally Posted by Basser View Post
This is wrong.
Saving every modified section every time it changes will not make your server less 'exploitable', neither will you have less rollbacks.

All that really matters is correctly handling the load of saving, things like safe-threading is important.

Unless your server 'forgets' data, saving it will not make a difference. It is already saved, its just not permanent, so make you sure you make it permanent at some time, and make sure your server does not close before this has happened.
Well yes it will reduce rollbacks, the idea behind saving every time something changes is that as soon as it changes its commited to the database, its impossible for there to be a rollback if its already commited to the database.
Korvacs is offline  
Old 09/11/2010, 00:12   #20
 
elite*gold: 0
Join Date: Jul 2010
Posts: 223
Received Thanks: 23
Quote:
Originally Posted by Korvacs View Post
Well yes it will reduce rollbacks, the idea behind saving every time something changes is that as soon as it changes its commited to the database, its impossible for there to be a rollback if its already commited to the database.
Exactly. If you make it so that the variable itself updates the database every time something changes, there's no time to even have a roll back (I guess technically there is but you'd have to be a very very very very unlucky person to pick up a dragonball on the last millisecond that the server is online! xP)
-Fáng- is offline  
Old 09/11/2010, 01:01   #21
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
But there's not really a way to save 0a single variable with Tanel's 5165 source.
You'd have to change everything.
Arcо is offline  
Old 09/11/2010, 02:25   #22
 
elite*gold: 0
Join Date: Jul 2010
Posts: 223
Received Thanks: 23
Quote:
Originally Posted by .Arco View Post
But there's not really a way to save 0a single variable with Tanel's 5165 source.
You'd have to change everything.
I know. The main problem with why it wasn't saving though was that the "file was in use". I fixed it so that when the file was in use, it would activate a variable called "saving" and that way, a waiting line could be created using while statements to use the file. Flat Databases with Flat Accounts and Characters is just a terrible idea! rofl! xP It's impossible to have concurrent connections when the file is in use!
-Fáng- is offline  
Old 09/11/2010, 10:42   #23


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
You would just need to change the character object so that it was full of Properties and not Fields, and then on the set; method have a call to the database to submit the data, then in the database make sure that all of the submits, updates, etc are threadsafe using monitor tryenter/exit.
Korvacs is offline  
Old 09/11/2010, 11:16   #24
 
elite*gold: 0
Join Date: Jul 2010
Posts: 223
Received Thanks: 23
Quote:
Originally Posted by Korvacs View Post
You would just need to change the character object so that it was full of Properties and not Fields, and then on the set; method have a call to the database to submit the data, then in the database make sure that all of the submits, updates, etc are threadsafe using monitor tryenter/exit.
That... or just ditch it and go with mysql =P
-Fáng- is offline  
Old 09/11/2010, 11:46   #25


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Quote:
Originally Posted by -Fáng- View Post
That... or just ditch it and go with mysql =P
Well no the principal is the same for both.
Korvacs is offline  
Old 09/11/2010, 20:19   #26
 
sohaib's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 258
Received Thanks: 102
omg , 3pages of speaking and i didn't got what i want, i give you my source, and tell me what i have to do ,( do to ******.cs , seach ***** and add ****)



why u make it simple like thit and it's done! ?


I think I'm boring, sorry for that^^
sohaib is offline  
Old 09/11/2010, 20:21   #27
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by sohaib View Post
omg , 3pages of speaking and i didn't got what i want, i give you my source, and tell me what i have to do ,( do to ******.cs , seach ***** and add ****)



why u make it simple like thit and it's done! ?


I think I'm boring, sorry for that^^
Cause no one is going to do everything for you.
Arcо is offline  
Thanks
1 User
Old 09/11/2010, 20:23   #28
 
elite*gold: 0
Join Date: Jul 2010
Posts: 223
Received Thanks: 23
Quote:
Originally Posted by .Arco View Post
Cause no one is going to do everything for you.
Arco's right. We're not going to download your source and make it for you. We have our own sources to work on. =\ You could try downloading that I wrote in my first month of coding... it's save system has a tiny fix on it that I'm sure you can copy into your source.
-Fáng- is offline  
Old 09/11/2010, 20:56   #29
 
sohaib's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 258
Received Thanks: 102
i will not use your source, icuz i worked on my source, and the source that i want to have is my source, i just want to know how to fix bug, i don't need advices or doing it for me, just tell me what i put in where
sohaib is offline  
Old 09/11/2010, 20:59   #30
 
elite*gold: 0
Join Date: Jul 2010
Posts: 223
Received Thanks: 23
Quote:
Originally Posted by sohaib View Post
i will not use your source, icuz i worked on my source, and the source that i want to have is my source, i just want to know how to fix bug, i don't need advices or doing it for me, just tell me what i put in where
I'm not releasing something like that. I'm already shunned for that source release. Just download it and look at it. That's what good coders do- they look at other works and try and understand how they did it.
-Fáng- is offline  
Reply


Similar Threads Similar Threads
5165 Save or Load Character Problem.
07/29/2010 - CO2 Private Server - 5 Replies
alright so IDK wtf I did 2 dis source dat now wen I login and log out my character doesnt save sumhow and like his/her gears are all fucked up wen u login again like...a necklace is where da armor should be at lol...and da armor is like da weapon...so on...only like 3 things save... well I'm hoping I can get answers from dis...I'll post my SaveCharacter/LoadCharacter void here... public static Game.Character LoadCharacter(string Name, ref string Account) { try ...
Roll Back or No Save Bug!! 5165
07/11/2010 - CO2 Private Server - 1 Replies
Hi, i have a co pserver 5165, i'm getting a fucked bug well i made a video to more understand YouTube - mybug.wmv please tell me what's the problem, or if it's possible help me to fix it and if no one know how to fix, please give me a good 5165 source
5165 source Don't save
07/01/2010 - CO2 Private Server - 3 Replies
hi i have a co pserver 5165 well the server don't save for exemple some one was lvl 50 and had 50kcps he dropped 1kkcps and leveled up to 137, well he disconnect, and after 5 ou 10mn he relog, and he find himself lvl 50 and has 50kcps only so the server didin't saved, i have 2 or 3 players who have same problem
fix 100% code save characters lvl and all for 5165
03/09/2010 - CO2 PServer Guides & Releases - 6 Replies
hello all this code for save lvl character and cps open Database.cs and search return "Error: Character already exists!"; del this code and add this new code



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


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