What's wrong with this code?
#1

All the Prints are being sent to the console, however the userfile isn't having any of the data written to the file.
The PlayerPath is also the right location, it creates the %s.cfg however, nothing is stored to it. It just says the players name as the name of the file.
pawn Code:
new INI:iFile = INI_Open(PlayerPath(playerid));
        print("SaveUserAccount Started");
        INI_SetTag(iFile,"data");
        INI_WriteString(iFile,"IP",pIP[playerid]);
        INI_WriteInt(iFile,"Admin",P_Info[playerid][Admin]);
    INI_WriteInt(iFile,"Cash",GetPlayerCash(playerid));
        INI_WriteInt(iFile,"Score",GetPlayerScore(playerid));
        INI_WriteInt(iFile,"Banned",P_Info[playerid][Banned]);
        INI_WriteInt(iFile,"Kills",P_Info[playerid][Kills]);
        INI_WriteInt(iFile,"Deaths", P_Info[playerid][Deaths]);
        INI_WriteInt(iFile,"Job", P_Info[playerid][Job]);
        INI_WriteInt(iFile,"Rank", P_Info[playerid][Rank]);
        INI_WriteFloat(iFile,"X", P_Info[playerid][pX]);
        INI_WriteFloat(iFile,"Y", P_Info[playerid][pY]);
        INI_WriteFloat(iFile,"Z", P_Info[playerid][pZ]);
        INI_WriteFloat(iFile,"A", P_Info[playerid][pA]);
        INI_WriteInt(iFile,"Int", P_Info[playerid][pInt]);
        INI_WriteInt(iFile,"World", P_Info[playerid][pWorld]);
        INI_WriteInt(iFile,"Faction", P_Info[playerid][Faction]);
        INI_WriteInt(iFile,"CarKey", P_Info[playerid][vKey]);
        INI_WriteInt(iFile,"BizKey", P_Info[playerid][B_Key]);
        INI_WriteInt(iFile,"Skin", GetPlayerSkin(playerid));
        INI_WriteInt(iFile,"Weapon", P_Info[playerid][Gun]);
        INI_WriteInt(iFile,"Bag", P_Info[playerid][B_Bag]);
        INI_WriteInt(iFile,"Licenses", P_Info[playerid][Lic]);
        INI_WriteInt(iFile,"IsNew", P_Info[playerid][New]);
    INI_WriteFloat(iFile,"Armour", P_Info[playerid][pArmour]);
    INI_WriteFloat(iFile,"Health", P_Info[playerid][pHealth]);
        INI_WriteInt(iFile,"Dead", P_Info[playerid][pDead]);
        INI_WriteInt(iFile,"Warnings", P_Info[playerid][Warnings]);
        INI_WriteInt(iFile,"RubberRounds", P_Info[playerid][r_bullets]);
        INI_WriteInt(iFile,"PhoneNum", P_Info[playerid][pPnumber]);
        INI_Close(iFile);
        print("SaveUserAccount Finished");
Serverlog
Code:
[17:29:08] SaveUserAccount Called
[17:29:08] SaveUserAccount Started
[17:29:08] SaveUserAccount Finished
Reply


Messages In This Thread
What's wrong with this code? - NOT SOLVED - - by Lynn - 23.12.2014, 22:49
Re: What's wrong with this code? - by LiamM - 23.12.2014, 23:07
Re: What's wrong with this code? - by Lynn - 23.12.2014, 23:44

Forum Jump:


Users browsing this thread: 1 Guest(s)