SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 09/03/2018, 03:31 PM   #1
enzulikeS
Big Clucker
 
Join Date: Jan 2018
Posts: 199
Reputation: 2
Default problem with saving the achievements

https://imgur.com/a/G73bY
in this screenshot you can see the achievements complete.

if i restart the server, the achievs become incomplete and i can do them at infinity.

the database is saving the first time when i complete the achievements, but them can be recompleted infinity times.

how can i fix it?

the function which saves the achievements in database:

Code:
function SalvareRealizari(playerid) {
	new string[256], query[256];
	format(string, sizeof(string),
		"%d|%d|%d|%d",
		PlayerInfo[playerid][pAchievement][0], PlayerInfo[playerid][pAchievement][1], PlayerInfo[playerid][pAchievement][2], PlayerInfo[playerid][pAchievement][3]);

	format(query, sizeof(query),
		"UPDATE `users` SET `Realizari`='%s' WHERE `ID`='%d'", string, PlayerInfo[playerid][pSQLID]);
	mysql_tquery(SQL, query, "","");
	return 1;
}
enzulikeS is offline   Reply With Quote
Old 09/03/2018, 05:24 PM   #2
Meller
Banned
 
Join Date: Dec 2016
Posts: 578
Reputation: 132
Default Re: problem with saving the achievements

If your local database is saving a value, why would we need the UPDATE query? ..
Meller is offline   Reply With Quote
Old 09/03/2018, 06:42 PM   #3
enzulikeS
Big Clucker
 
Join Date: Jan 2018
Posts: 199
Reputation: 2
Default Re: problem with saving the achievements

removed the query update but the same problem

if i restart server, i can do the achiv at infinity, but in the database the value is 1, which means it's already done

any fixes?
enzulikeS is offline   Reply With Quote
Old 09/03/2018, 06:47 PM   #4
Meller
Banned
 
Join Date: Dec 2016
Posts: 578
Reputation: 132
Default Re: problem with saving the achievements

Quote:
Originally Posted by enzulikeS View Post
removed the query update but the same problem

if i restart server, i can do the achiv at infinity, but in the database the value is 1, which means it's already done

any fixes?
Try deleting System32 while you're at it.
Meller is offline   Reply With Quote
Old 09/03/2018, 06:49 PM   #5
enzulikeS
Big Clucker
 
Join Date: Jan 2018
Posts: 199
Reputation: 2
Default Re: problem with saving the achievements

nice joke, don't do it anymore.
enzulikeS is offline   Reply With Quote
Old 10/03/2018, 09:11 AM   #6
enzulikeS
Big Clucker
 
Join Date: Jan 2018
Posts: 199
Reputation: 2
Default Re: problem with saving the achievements

anyone
enzulikeS is offline   Reply With Quote
Old 10/03/2018, 03:16 PM   #7
PepsiCola23
Gangsta
 
Join Date: May 2015
Posts: 728
Reputation: 3
Default Re: problem with saving the achievements

how do you use the function above?
show us what happens when he finishes one quest
PepsiCola23 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Achievements Mititel Scripting Help 9 07/09/2015 07:19 PM
problem saving variable saving is wrong unamed Scripting Help 1 31/03/2015 09:26 AM
[FilterScript] Simple Achievements(Achievement saving and bonuses!) V1ceC1ty Filterscripts 12 11/06/2012 11:35 AM
Achievements Haydz Help Archive 1 17/11/2010 06:09 AM
[FilterScript] [FS] Achievements 0.9 bogeymanEST Filterscripts 15 08/07/2010 08:13 PM


All times are GMT. The time now is 12:15 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.