About Y_INI , Two Same StringDatebase in one file. -
VivianKris - 24.07.2011
I write a account system.
first i login my GM,and the ini file is:
Код:
nickname = Vivian_Kris
password = aaaa
skin = 60
weapon_1 = 0
weapon_2 = 0
weapon_3 = 0
weapon_4 = 0
But next time I save the account or relogin.
if become
Код:
nickname = Vivian_Kris
password = aaaa
skin = 60
weapon_1 = 0
weapon_2 = 0
weapon_3 = 0
weapon_4 = 0
nickname =
there are another nickname it write.
Re: hi,****** Comein please.I find Y_INI bug? -
[HiC]TheKiller - 24.07.2011
Showing us your code would help a lot.
Re: hi,****** Comein please.I find Y_INI bug? -
Danny - 24.07.2011
****** isn't the only one on this entire forum that will help you.
First, show us the code. Otherwise we can't really help you.
Re: hi,****** Comein please.I find Y_INI bug? -
VivianKris - 24.07.2011
Okay The Code
pawn Код:
SavePlayerInfo(playerid)
{
if(pLogged[playerid] >0)
{
pInfo[playerid][pSkin] = GetPlayerSkin(playerid);
new ammo[4];
GetPlayerWeaponData(playerid, 0, pInfo[playerid][pWp1], ammo[0]);
GetPlayerWeaponData(playerid, 1, pInfo[playerid][pWp2], ammo[1]);
GetPlayerWeaponData(playerid, 2, pInfo[playerid][pWp3], ammo[2]);
GetPlayerWeaponData(playerid, 3, pInfo[playerid][pWp4], ammo[3]);
new nickname[35];
format(nickname,sizeof(nickname),PLAYER_INFO,GetName(playerid));
new INI:PlayerFile = INI_Open(nickname);
INI_WriteString(PlayerFile,"nickname",pInfo[playerid][pName]);
INI_WriteString(PlayerFile,"password",pInfo[playerid][pPass]);
INI_WriteInt(PlayerFile,"skin",pInfo[playerid][pSkin]);
INI_WriteInt(PlayerFile,"weapon_1",pInfo[playerid][pWp1]);
INI_WriteInt(PlayerFile,"weapon_2",pInfo[playerid][pWp2]);
INI_WriteInt(PlayerFile,"weapon_3",pInfo[playerid][pWp3]);
INI_WriteInt(PlayerFile,"weapon_4",pInfo[playerid][pWp4]);
INI_Close(PlayerFile);
}
}
Re: hi,****** Comein please.I find Y_INI bug? -
[HiC]TheKiller - 24.07.2011
Take off
pawn Код:
INI_WriteString(PlayerFile,"nickname",pInfo[playerid][pName]);
Or make sure that pInfo[playerid][pName] is actually the players name.
Re: hi,****** Comein please.I find Y_INI bug? -
VivianKris - 24.07.2011
Quote:
Originally Posted by [HiC]TheKiller
Take off
pawn Код:
INI_WriteString(PlayerFile,"nickname",pInfo[playerid][pName]);
Or make sure that pInfo[playerid][pName] is actually the players name.
|
Yes it removed but it begin to copy
Re: hi,****** Comein please.I find Y_INI bug? -
Mean - 24.07.2011
The only thing that could probably be the problem is that pInfo[playerid][pPass] is wrong. I don't know what else could it be.
Re: hi,****** Comein please.I find Y_INI bug? -
VivianKris - 24.07.2011
Quote:
Originally Posted by Mean
The only thing that could probably be the problem is that pInfo[playerid][pPass] is wrong. I don't know what else could it be.
|
Wrong?
Please explan that thanks.
My dialog will return a error when player enter wrong password.