SA-MP Forums Archive
Save Stats Problem - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Save Stats Problem (/showthread.php?tid=138368)



Save Stats Problem - bauer123 - 01.04.2010

Hello evryone my name is Mike/Spectro
Ok i have created my own gamemode and it has user system(register/login/ranks/adminsys) and that
But i have a problem
In 70% of cases the stats will not save
It just shows all as 0
Please help?
And if you can help tell me what codes i need to post!


Re: Save Stats Problem - Last_Stand_Guardian - 01.04.2010

What are you using?
Dini, normal fopen-fclose? :O


Re: Save Stats Problem - bauer123 - 01.04.2010

Dini


Re: Save Stats Problem - Last_Stand_Guardian - 01.04.2010

Let's make a test:

pawn Код:
if(strcmp("/testdini", cmdtext, true, 10) == 0)
{
     new string[128];
     new PlayerName[MAX_PLAYER_NAME];
     GetPlayerName(playerid, PlayerName, sizeof(PlayerName);
     format(string, sizeof(string), "%s.ini", PlayerName);
     dini_IntSet(string, "ranks", 6);
     return 1;
}
Replace the dini-key by the real key and look if it keep saved :O


Re: Save Stats Problem - bauer123 - 01.04.2010

Oh well i fixed it