Need help with INI files
#1

Im using y_ini include. And i want that on every player connect a file named after the player would be created.

So far i got this:
pawn Код:
new name[MAX_PLAYER_NAME],file[100];
    GetPlayerName(playerid,name,sizeof(name));
    format(file,sizeof(file),name);
    new INI:ini=INI_Open(name);
But it creates an uknown type of file. NOT .ini,please help

And how can i check if the file already exists?
Or none of the above are possible with y_ini
Reply
#2

pawn Код:
format(file,sizeof(file), "%s.ini", name);
pawn Код:
new fileExists = fexist(file);
Reply
#3

Try this:
pawn Код:
new name[MAX_PLAYER_NAME],file[100];
    GetPlayerName(playerid,name,sizeof(name));
    format(file,sizeof(file),"%s.ini", name);
    new INI:ini=INI_Open(file);
And to check if a file exist you can use:

pawn Код:
if(fexist(file))
Reply
#4

Nop,the file is still NOT .ini
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)