problem with saving the achievements - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: problem with saving the achievements (
/showthread.php?tid=650900)
problem with saving the achievements -
enzulikeS - 09.03.2018
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;
}
Re: problem with saving the achievements -
Meller - 09.03.2018
If your local database is saving a value, why would we need the UPDATE query? ..
Re: problem with saving the achievements -
enzulikeS - 09.03.2018
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?
Re: problem with saving the achievements -
Meller - 09.03.2018
Quote:
Originally Posted by enzulikeS
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.
Re: problem with saving the achievements -
enzulikeS - 09.03.2018
nice joke, don't do it anymore.
Re: problem with saving the achievements -
enzulikeS - 10.03.2018
anyone
Re: problem with saving the achievements -
PepsiCola23 - 10.03.2018
how do you use the function above?
show us what happens when he finishes one quest