AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [FIXED] Player's data wipes if exit during Mapchange [SQLITE] (https://forums.alliedmods.net/showthread.php?t=282105)

WAR3DM 04-28-2016 20:22

[FIXED] Player's data wipes if exit during Mapchange [SQLITE]
 
Hello and thanks for your time :)

I'm having issues with SQLITE data being wiped for a specific player that quits during a mapchange.

safetymoose 04-28-2016 20:27

Re: [HELP] Player's data wipes if exit during Mapchange [SQLITE]
 
Before you do anything and try to save data, you must make sure that the player is actually connected, you dont want to save an empty value if the player leaves and you try to save.

Add an is_user_connected(id) check inside your SQLITE_Save function.

WAR3DM 04-28-2016 20:29

Re: [HELP] Player's data wipes if exit during Mapchange [SQLITE]
 
It worked, thanks!

Code:

        if (!is_user_connected( id )) {
        return;
        }


safetymoose 04-28-2016 20:50

Re: [HELP] Player's data wipes if exit during Mapchange [SQLITE]
 
it should work fine. I see you missed a bracket in the code you posted here, maybe that is causing your problem.

WAR3DM 04-28-2016 21:02

Re: [HELP] Player's data wipes if exit during Mapchange [SQLITE]
 
Yes that was it, you just made thousands of people happy. :)

safetymoose 04-29-2016 13:24

Re: [FIXED] Player's data wipes if exit during Mapchange [SQLITE]
 
dont delete the code after someone helps you, or you wont get any help in the future!

SkumTomteN 05-01-2016 12:20

Re: [FIXED] Player's data wipes if exit during Mapchange [SQLITE]
 
Quote:

Originally Posted by WAR3DM (Post 2415067)
Hello and thanks for your time :)

I'm having issues with SQLITE data being wiped for a specific player that quits during a mapchange.

Post the working code again lol.


All times are GMT -4. The time now is 18:44.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.