Saving Data small help please - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Saving Data small help please (
/showthread.php?tid=369401)
Saving Data small help please -
Healian - 17.08.2012
I already created my sql database and created the saving function which saves all the desired data in the database
but my question is
When to execute the save data function, is it good to save data only when user DC
Re: Saving Data small help please -
VOXrr - 17.08.2012
This belongs in the scripting section, however, let's think about this logically.
<!-- Removed Gibberish -->
Ignore my lunacy. Just make sure your server doesn't crash.
Re: Saving Data small help please -
SuperViper - 17.08.2012
Quote:
Originally Posted by VOXrr
This belongs in the scripting section, however, let's think about this logically.
If you're only saving data when the user cleanly quits, you have a major problem if either of these events occur: - Your server crashes.
- Their SA:MP client crashes.
- Their internet connection cuts off.
- Their PC overheats, and then turns off.
I could continue, but hopefully you see the point. They'd lose their recent changes.
The real question is - Do you want to sacrifice a bit of CPU performance from saving the data, or be prepared from them coming to your house with pitchforks?
|
A rollback will only occur when the server crashes.
Re: Saving Data small help please -
VOXrr - 17.08.2012
Quote:
Originally Posted by SuperViper
A rollback will only occur when the server crashes.
|
You sure?
EDIT: Derp, checked out the SA:MP wiki. I failed.