|
You last visited: Today at 12:58
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.
09/10/2010, 22:23
|
#16
|
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.
|
|
|
09/10/2010, 22:43
|
#17
|
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 506
|
Quote:
Originally Posted by pro4never
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.
|
|
|
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:
|
|
|
09/10/2010, 23:51
|
#19
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Quote:
Originally Posted by Basser
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.
|
|
|
09/11/2010, 00:12
|
#20
|
elite*gold: 0
Join Date: Jul 2010
Posts: 223
Received Thanks: 23
|
Quote:
Originally Posted by Korvacs
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)
|
|
|
09/11/2010, 01:01
|
#21
|
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.
|
|
|
09/11/2010, 02:25
|
#22
|
elite*gold: 0
Join Date: Jul 2010
Posts: 223
Received Thanks: 23
|
Quote:
Originally Posted by .Arco
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!
|
|
|
09/11/2010, 10:42
|
#23
|
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.
|
|
|
09/11/2010, 11:16
|
#24
|
elite*gold: 0
Join Date: Jul 2010
Posts: 223
Received Thanks: 23
|
Quote:
Originally Posted by Korvacs
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
|
|
|
09/11/2010, 11:46
|
#25
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Quote:
Originally Posted by -Fáng-
That... or just ditch it and go with mysql =P
|
Well no the principal is the same for both.
|
|
|
09/11/2010, 20:19
|
#26
|
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^^
|
|
|
09/11/2010, 20:21
|
#27
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
|
Quote:
Originally Posted by sohaib
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.
|
|
|
09/11/2010, 20:23
|
#28
|
elite*gold: 0
Join Date: Jul 2010
Posts: 223
Received Thanks: 23
|
Quote:
Originally Posted by .Arco
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.
|
|
|
09/11/2010, 20:56
|
#29
|
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
|
|
|
09/11/2010, 20:59
|
#30
|
elite*gold: 0
Join Date: Jul 2010
Posts: 223
Received Thanks: 23
|
Quote:
Originally Posted by sohaib
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.
|
|
|
 |
|
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 12:59.
|
|