Saving system don't save anything!
#1

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

Why you dont try to use something better and faster?
Reply
#3

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

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

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

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

Problem fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)