Need Auto Save Code for 5165

09/10/2010 22:23 Arcо#16
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 Basser#17
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.
09/10/2010 23:20 -Fáng-#18
I uploaded my old source edit...
You can download it if you want. I did my best to fix the rollback problem:
[Only registered and activated users can see links. Click Here To Register...]
09/10/2010 23:51 Korvacs#19
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.
09/11/2010 00:12 -Fáng-#20
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)
09/11/2010 01:01 Arcо#21
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 -Fáng-#22
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!
09/11/2010 10:42 Korvacs#23
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 -Fáng-#24
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
09/11/2010 11:46 Korvacs#25
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.
09/11/2010 20:19 sohaib#26
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 ****)

[Only registered and activated users can see links. Click Here To Register...]

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


I think I'm boring, sorry for that^^
09/11/2010 20:21 Arcо#27
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 ****)

[Only registered and activated users can see links. Click Here To Register...]

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 -Fáng-#28
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 [Only registered and activated users can see links. Click Here To Register...] 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 sohaib#29
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 -Fáng-#30
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.