problem with saving the achievements
#1

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

If your local database is saving a value, why would we need the UPDATE query? ..
Reply
#3

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

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

nice joke, don't do it anymore.
Reply
#6

anyone
Reply
#7

how do you use the function above?
show us what happens when he finishes one quest
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)