PDA

View Full Version : problem with saving the achievements


enzulikeS
09/03/2018, 03:31 PM
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:

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;
}

Meller
09/03/2018, 05:24 PM
If your local database is saving a value, why would we need the UPDATE query? ..

enzulikeS
09/03/2018, 06:42 PM
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?

Meller
09/03/2018, 06:47 PM
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.

enzulikeS
09/03/2018, 06:49 PM
nice joke, don't do it anymore.

enzulikeS
10/03/2018, 09:11 AM
anyone

PepsiCola23
10/03/2018, 03:16 PM
how do you use the function above?
show us what happens when he finishes one quest