y_ini beginner prob!
#1

Hello all,

I've just started to use y_ini and it's a lil' complicated after dini..
So that's what I got:
pawn Код:
new INI:iFile = INI_Open(PlayerPath(playerid));
        INI_SetTag(iFile,"data");
        INI_WriteInt(iFile,"Pass",-1);
        INI_WriteInt(iFile,"Admin",0);
        INI_WriteInt(iFile,"Score",0);
        INI_WriteInt(iFile,"Banned",0);
        INI_Close(iFile);
PlayerPath:
pawn Код:
stock PlayerPath(playerid) {
    new iStr[256],name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(iStr,sizeof(iStr),PATH,name);
    return iStr;
}
PATH is "/Users/%.ini"

It worked fine with dini reading and etc. but now it just creates a file named "91ni"

Can you help me?
Reply
#2

Path should be:

pawn Код:
"/Users/%s.ini"
Forgot the 's'

Jeffry
Reply
#3

Quote:
Originally Posted by Jeffry
Посмотреть сообщение
Path should be:

pawn Код:
"/Users/%s.ini"
Forgot the 's'

Jeffry
Lol Jeffry thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)