Score is not saving help me pls (y_ini) -
ReD_HunTeR - 05.12.2013
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]);
Re: Score is not saving help me pls (y_ini) -
Konstantinos - 05.12.2013
And the saving part? INI_WriteInt
You should also use GetPlayerScore(playerid) as value to save the score.
Re: Score is not saving help me pls (y_ini) -
ReD_HunTeR - 05.12.2013
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]);
Re: Score is not saving help me pls (y_ini) -
Konstantinos - 05.12.2013
No, I meant the last line you posted!
pawn Код:
// In OnPlayerDisconnect:
INI_WriteInt(File,"Scores",GetPlayerScore(playerid));
Re: Score is not saving help me pls (y_ini) -
ReD_HunTeR - 05.12.2013
i setted
Код:
INI_WriteInt(File,"Scores",PlayerInfo[playerid][pScores]);
to this
Код:
INI_WriteInt(File,"Scores",GetPlayerScore(playerid));
but still not working
Re: Score is not saving help me pls (y_ini) -
Konstantinos - 05.12.2013
Do the rest of the player's data get saved to the file?
Re: Score is not saving help me pls (y_ini) -
ReD_HunTeR - 05.12.2013
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
Re: Score is not saving help me pls (y_ini) -
ReD_HunTeR - 05.12.2013
oh its fixed but thaanks anyway, you help me alot in this scipt as well ill rep you soon.