hi,****** Comein please.I find Y_INI bug?
#1

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

Showing us your code would help a lot.
Reply
#3

****** 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.
Reply
#4

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);
    }
}
Reply
#5

Take off

pawn Код:
INI_WriteString(PlayerFile,"nickname",pInfo[playerid][pName]);
Or make sure that pInfo[playerid][pName] is actually the players name.
Reply
#6

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
pawn Код:
password =
Reply
#7

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.
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)