Registration question
#1

When I register it doesn't save the things, only creates the playerfile, but it's empty inside, why?

pawn Код:
new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                PlayerInfo[playerid][pPassword] = udb_hash(inputtext);
                INI_WriteInt(File,"Password",PlayerInfo[playerid][pPassword]);
                PlayerInfo[playerid][pMoney] = 1000;
                INI_WriteInt(File,"Money",PlayerInfo[playerid][pMoney]);
                PlayerInfo[playerid][pAdminLevel] = 0;
                INI_WriteInt(File,"AdminLevel",PlayerInfo[playerid][pAdminLevel]);
                PlayerInfo[playerid][pSkin] = 0;
                INI_WriteInt(File,"Skin",PlayerInfo[playerid][pSkin]);
                PlayerInfo[playerid][pRegistered] = 0;
                INI_WriteInt(File,"Registered",PlayerInfo[playerid][pRegistered]);
                PlayerInfo[playerid][pAge] = 0;
                INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
                PlayerInfo[playerid][pOrigin] = 0;
                INI_WriteInt(File,"Origin",PlayerInfo[playerid][pOrigin]);
                PlayerInfo[playerid][pAccent] = 0;
                INI_WriteInt(File,"Accent",PlayerInfo[playerid][pAccent]);
                PlayerInfo[playerid][pHealth] = 100;
                INI_WriteFloat(File,"Health",PlayerInfo[playerid][pHealth]);
                PlayerInfo[playerid][pArmour] = 0;
                INI_WriteFloat(File,"Armour",PlayerInfo[playerid][pArmour]);
                PlayerInfo[playerid][pBank] = 500;
                INI_WriteInt(File,"Bank",PlayerInfo[playerid][pBank]);
                PlayerInfo[playerid][pJob] = 0;
                INI_WriteInt(File,"Job",PlayerInfo[playerid][pJob]);
                PlayerInfo[playerid][pFaction] = 0;
                INI_WriteInt(File,"Faction",PlayerInfo[playerid][pFaction]);
                PlayerInfo[playerid][pRank] = 0;
                INI_WriteInt(File,"Rank",PlayerInfo[playerid][pRank]);
                PlayerInfo[playerid][pLicense] = 0;
                INI_WriteInt(File,"License",PlayerInfo[playerid][pLicense]);
                PlayerInfo[playerid][pCocaine] = 0;
                INI_WriteInt(File,"Cocaine",PlayerInfo[playerid][pCocaine]);
                PlayerInfo[playerid][pMarijuana] = 0;
                INI_WriteInt(File,"Marijuana",PlayerInfo[playerid][pMarijuana]);
                PlayerInfo[playerid][pDonater] = 0;
                INI_WriteInt(File,"Donater",PlayerInfo[playerid][pDonater]);
                PlayerInfo[playerid][pDonaterPoints] = 0;
                INI_WriteInt(File,"DonaterPoints",PlayerInfo[playerid][pDonaterPoints]);
                PlayerInfo[playerid][pWatch] = 0;
                INI_WriteInt(File,"Watch",PlayerInfo[playerid][pWatch]);
                PlayerInfo[playerid][pPhone] = 0;
                INI_WriteInt(File,"Phone",PlayerInfo[playerid][pPhone]);
                PlayerInfo[playerid][pPhoneNumber] = 0;
                INI_WriteInt(File,"PhoneNumber",PlayerInfo[playerid][pPhoneNumber]);
                PlayerInfo[playerid][pHouse] = 0;
                INI_WriteInt(File,"House",PlayerInfo[playerid][pHouse]);
                PlayerInfo[playerid][pCigars] = 0;
                INI_WriteInt(File,"Cigars",PlayerInfo[playerid][pCigars]);
                PlayerInfo[playerid][pLighter] = 0;
                INI_WriteInt(File,"Lighter",PlayerInfo[playerid][pLighter]);
                PlayerInfo[playerid][pMask] = 0;
                INI_WriteInt(File,"Mask",PlayerInfo[playerid][pMask]);
                PlayerInfo[playerid][pJailTime] = 0;
                INI_WriteInt(File,"JailTime",PlayerInfo[playerid][pJailTime]);
                PlayerInfo[playerid][pGun01] = 0;
                INI_WriteInt(File,"Gun01",PlayerInfo[playerid][pGun01]);
                PlayerInfo[playerid][pGun02] = 0;
                INI_WriteInt(File,"Gun02",PlayerInfo[playerid][pGun02]);
                PlayerInfo[playerid][pGun03] = 0;
                INI_WriteInt(File,"Gun03",PlayerInfo[playerid][pGun03]);
                PlayerInfo[playerid][pGun04] = 0;
                INI_WriteInt(File,"Gun04",PlayerInfo[playerid][pGun04]);
                PlayerInfo[playerid][pGun05] = 0;
                INI_WriteInt(File,"Gun05",PlayerInfo[playerid][pGun05]);
                PlayerInfo[playerid][pGun06] = 0;
                INI_WriteInt(File,"Gun06",PlayerInfo[playerid][pGun06]);
                PlayerInfo[playerid][pGun07] = 0;
                INI_WriteInt(File,"Gun07",PlayerInfo[playerid][pGun07]);
                PlayerInfo[playerid][pGun08] = 0;
                INI_WriteInt(File,"Gun08",PlayerInfo[playerid][pGun08]);
                PlayerInfo[playerid][pGun09] = 0;
                INI_WriteInt(File,"Gun09",PlayerInfo[playerid][pGun09]);
                PlayerInfo[playerid][pGun11] = 0;
                INI_WriteInt(File,"Gun11",PlayerInfo[playerid][pGun11]);
                PlayerInfo[playerid][pAmmo01] = 0;
                INI_WriteInt(File,"Ammo01",PlayerInfo[playerid][pAmmo01]);
                PlayerInfo[playerid][pAmmo02] = 0;
                INI_WriteInt(File,"Ammo02",PlayerInfo[playerid][pAmmo02]);
                PlayerInfo[playerid][pAmmo03] = 0;
                INI_WriteInt(File,"Ammo03",PlayerInfo[playerid][pAmmo03]);
                PlayerInfo[playerid][pAmmo04] = 0;
                INI_WriteInt(File,"Ammo04",PlayerInfo[playerid][pAmmo04]);
                PlayerInfo[playerid][pAmmo05] = 0;
                INI_WriteInt(File,"Ammo05",PlayerInfo[playerid][pAmmo05]);
                PlayerInfo[playerid][pAmmo06] = 0;
                INI_WriteInt(File,"Ammo06",PlayerInfo[playerid][pAmmo06]);
                PlayerInfo[playerid][pAmmo07] = 0;
                INI_WriteInt(File,"Ammo07",PlayerInfo[playerid][pAmmo07]);
                PlayerInfo[playerid][pAmmo08] = 0;
                INI_WriteInt(File,"Ammo08",PlayerInfo[playerid][pAmmo08]);
                PlayerInfo[playerid][pAmmo09] = 0;
                INI_WriteInt(File,"Ammo09",PlayerInfo[playerid][pAmmo09]);
                PlayerInfo[playerid][pAmmo11] = 0;
                INI_WriteInt(File,"Ammo11",PlayerInfo[playerid][pAmmo11]);
                INI_Close(File);
pawn Код:
stock UserPath(playerid)
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),PATH,playername);
    return string;
}
Reply


Messages In This Thread
Registration question - by Mento - 03.05.2012, 03:25
Re: Registration question - by NewerthRoleplay - 03.05.2012, 06:51
Re: Registration question - by Mento - 03.05.2012, 18:37
Re: Registration question - by NewerthRoleplay - 04.05.2012, 06:26
Re: Registration question - by Mento - 04.05.2012, 10:23
Re: Registration question - by NewerthRoleplay - 05.05.2012, 17:29
Re: Registration question - by Mento - 05.05.2012, 18:48
Re: Registration question - by nickdodd25 - 05.05.2012, 21:14
Re: Registration question - by Mento - 06.05.2012, 16:00

Forum Jump:


Users browsing this thread: 1 Guest(s)