SA-MP Forums Archive
Saving system don't save anything! - 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: Saving system don't save anything! (/showthread.php?tid=439615)



Saving system don't save anything! - Areax - 26.05.2013

Hello!

I did Login/Register system, but it doesn't save anything...

Here is my OnPlayerDisconnect:

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new file[100];
    format(file, sizeof(file), PlayerFile, gPlayerInfo[playerid][pName]);
    dini_Set(file, "Name", gPlayerInfo[playerid][pName]);
    dini_Set(file, "Ip", gPlayerInfo[playerid][pIp]);
    dini_IntSet(file, "Registered", gPlayerInfo[playerid][pRegged]);
    dini_IntSet(file, "Password", gPlayerInfo[playerid][pPassword]);
    dini_IntSet(file, "Admin Level", gPlayerInfo[playerid][pAdminLevel]);
    dini_IntSet(file, "Money", GetPlayerMoney(playerid));
    dini_IntSet(file, "VIP Level", gPlayerInfo[playerid][pVipLevel]);
    dini_IntSet(file, "Score", GetPlayerScore(playerid));
    dini_Set(file, "Kills", gPlayerInfo[playerid][pKills]);
    dini_Set(file, "Deaths", gPlayerInfo[playerid][pDeaths]);
    gPlayerLogged[playerid] = 0;
    return 1;
}
Is here anything wrong?

Thanks for help


Re: Saving system don't save anything! - ]Rafaellos[ - 26.05.2013

Why you dont try to use something better and faster?


Re: Saving system don't save anything! - Areax - 26.05.2013

Quote:
Originally Posted by ]Rafaellos[
Посмотреть сообщение
Why you dont try to use something better and faster?
What do you mean?


Re: Saving system don't save anything! - ]Rafaellos[ - 26.05.2013

I mean to stop using DINI and try to use YINI instead.


Re: Saving system don't save anything! - Areax - 26.05.2013

Is this tutorial good? https://sampforum.blast.hk/showthread.php?tid=352703


AW: Saving system don't save anything! - Skimmer - 26.05.2013

Why you don't use if-sentece first? What happens if a player doesn't register and quits? His stats will be saved too.
pawn Код:
if(gPlayerLogged[playerid] = 1)
To your problem can you show me what's defined in PlayerFile?


Re: Saving system don't save anything! - Areax - 26.05.2013

Problem fixed.