Score is not saving help me pls (y_ini)
#1

my question is why script is not saving the scores as you can see topic, so why cant?

Codes:

Код:
enum pInfo
{
    pScores
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Код:
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Scores",PlayerInfo[playerid][pScores]);
    return 1;
}
Dialog Response (Register)
Код:
                INI_WriteInt(File,"Scores",0);
Dialog Respone (Login)
Код:
                    SetPlayerScore(playerid,PlayerInfo[playerid][pScores]);
Reply
#2

And the saving part? INI_WriteInt

You should also use GetPlayerScore(playerid) as value to save the score.
Reply
#3

i cant understand what do you mean lol,

INI_WriteInt at LoadUser_data?
and?
GetPlayerScore(playerid)? at Disconnect?

oh btw i have one more thing it in the script here:

OnPlayerDisconnect
Код:
    INI_WriteInt(File,"Scores",PlayerInfo[playerid][pScores]);
Reply
#4

No, I meant the last line you posted!

pawn Код:
// In OnPlayerDisconnect:
INI_WriteInt(File,"Scores",GetPlayerScore(playerid));
Reply
#5

i setted

Код:
    INI_WriteInt(File,"Scores",PlayerInfo[playerid][pScores]);
to this

Код:
    INI_WriteInt(File,"Scores",GetPlayerScore(playerid));
but still not working
Reply
#6

Do the rest of the player's data get saved to the file?
Reply
#7

yes they do..


Код:
[data]
Password = 68944173
Cash = 1000000
Admin = 8
Kills = 0(not someone to kill in my server so 0 lol)
Deaths = 1
Vip = 4
Scores = 0
Reply
#8

oh its fixed but thaanks anyway, you help me alot in this scipt as well ill rep you soon.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)