SQLX reset user data
Example: the guy enters the server, but the sql did not connect, and by chance the sql connects in the middle of the match, when this player leaves the server their data is 0, because when he entered the sql did not load their data, any tips?
|
Re: SQLX reset user data
The first thing you can try is to remove any delay during the connection step. So if you're doing the connection with set_task, do it in either plugin_init or plugin_cfg directly. As far I know, both are called before any player joins the server.
If that doesn't apply to you, you could set an "infinite" task when a player joins the server and keep trying to load the data. Once successfully loaded, remove the task. You would probably need to check if the task doesn't exists before inserting/updating. Yet another way is to create a bool and set it to true if the data is loaded. Then, in the "save data function", check whether the variable is true or false. If true, insert/update, if false you do nothing. Consider posting the code of the plugin. If we knew the cause, you would probably receive a more specific answer. |
Re: SQLX reset user data
maybe I use sqlite, then the problems are over, but I can't use web pages
|
| All times are GMT -4. The time now is 14:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.