Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
WAR3DM
Senior Member
Join Date: Mar 2016
Old 04-28-2016 , 20:22   [FIXED] Player's data wipes if exit during Mapchange [SQLITE]
Reply With Quote #1

Hello and thanks for your time

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

Last edited by WAR3DM; 04-28-2016 at 21:14.
WAR3DM is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 04-28-2016 , 20:27   Re: [HELP] Player's data wipes if exit during Mapchange [SQLITE]
Reply With Quote #2

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.
safetymoose is offline
WAR3DM
Senior Member
Join Date: Mar 2016
Old 04-28-2016 , 20:29   Re: [HELP] Player's data wipes if exit during Mapchange [SQLITE]
Reply With Quote #3

It worked, thanks!

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

Last edited by WAR3DM; 04-28-2016 at 21:15.
WAR3DM is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 04-28-2016 , 20:50   Re: [HELP] Player's data wipes if exit during Mapchange [SQLITE]
Reply With Quote #4

it should work fine. I see you missed a bracket in the code you posted here, maybe that is causing your problem.
safetymoose is offline
WAR3DM
Senior Member
Join Date: Mar 2016
Old 04-28-2016 , 21:02   Re: [HELP] Player's data wipes if exit during Mapchange [SQLITE]
Reply With Quote #5

Yes that was it, you just made thousands of people happy.
WAR3DM is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 04-29-2016 , 13:24   Re: [FIXED] Player's data wipes if exit during Mapchange [SQLITE]
Reply With Quote #6

dont delete the code after someone helps you, or you wont get any help in the future!
safetymoose is offline
SkumTomteN
Veteran Member
Join Date: Oct 2013
Location: Asgard
Old 05-01-2016 , 12:20   Re: [FIXED] Player's data wipes if exit during Mapchange [SQLITE]
Reply With Quote #7

Quote:
Originally Posted by WAR3DM View Post
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.
__________________
Contact: Steam
Videos: Youtube
SkumTomteN is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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