Saving Data small help please
#1

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
Reply
#2

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.
Reply
#3

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.
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)