Dini saving, doesn't create file!
#1

Код:
public OnPlayerDisconnect(playerid, reason)
{
            new pFile[100], pName[MAX_PLAYER_NAME];
            new pMoney = GetPlayerMoney(playerid);
            new pSkin  = GetPlayerSkin(playerid);
            new Float:X,Float:Y,Float:Z;
			GetPlayerPos(playerid,X,Y,Z);
	        GetPlayerName(playerid, pName, sizeof(pName));
	        format(pFile, sizeof(pFile), REGISTER_PATH, pName);
	        dini_FloatSet(pFile,"posx", X);
			dini_FloatSet(pFile,"posy", Y);
			dini_FloatSet(pFile,"posz", Z);
	        dini_IntSet(pFile, "Cash", pMoney);
	        dini_IntSet(pFile, "Skin", pSkin);
        return 1;
}
I made this... why doesn't it create the file??

LOL fixed with dini_Create(pFile);

>>>>>>N00B<<<<<<<
Reply
#2

Quote:
Originally Posted by [JnA]DukeNukem
Посмотреть сообщение
Код:
public OnPlayerDisconnect(playerid, reason)
{
            new pFile[100], pName[MAX_PLAYER_NAME];
            new pMoney = GetPlayerMoney(playerid);
            new pSkin  = GetPlayerSkin(playerid);
            new Float:X,Float:Y,Float:Z;
			GetPlayerPos(playerid,X,Y,Z);
	        GetPlayerName(playerid, pName, sizeof(pName));
	        format(pFile, sizeof(pFile), REGISTER_PATH, pName);
	        dini_FloatSet(pFile,"posx", X);
			dini_FloatSet(pFile,"posy", Y);
			dini_FloatSet(pFile,"posz", Z);
	        dini_IntSet(pFile, "Cash", pMoney);
	        dini_IntSet(pFile, "Skin", pSkin);
        return 1;
}
I made this... why doesn't it create the file??

LOL fixed with dini_Create(pFile);

>>>>>>N00B<<<<<<<
The weird thing is, dini will create the file itself in dini_xxxSet if it doesn't exists.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)