y_ini problems.
#1

Hello there,

I've decided to make one more script before I actually think on deciding to leave SA:MP or not.

------

I am trying to use y_ini for file writing, but it is very confusing to me. I already sent a PM to ******, waiting for a reply, but just in case he doesn't actually respond I'll just ask here.

Well, I need help on finding if a file exists or not, and I don't know how.

pawn Code:
public OnPlayerConnect(playerid)
{
     format(str, sizeof(str), "/ZeusAdmin/Accounts/%s.ini", pName(playerid));
     return 1;
}
Sadly, that's all I have so far. I don't know what function to use to check if the player's file exists or not.

I really do wish there was a wiki page on this file writing / reading system.

I'm not sure what to do, use fexist, or use a function inside y_ini (hopefully).

pawn Code:
public OnPlayerConnect(playerid)
{
    format(str, sizeof(str), "/ZeusAdmin/Accounts/%s.ini", pName(playerid));
    new INI:handler = INI_Open(str);
    if(.....)
    return 1;
}
That is what I am thinking of, but the if statement is stumping me. I can't figure what to 'if' about, since there is no actual function to check if the file exists.

Please do help,

The Toni
Reply


Messages In This Thread
y_ini problems. - by Toni - 23.11.2010, 01:39
Re: y_ini problems. - by [L3th4l] - 23.11.2010, 01:43
Re: y_ini problems. - by Toni - 23.11.2010, 01:52
Re: y_ini problems. - by [L3th4l] - 23.11.2010, 01:55
Re: y_ini problems. - by Toni - 23.11.2010, 02:18

Forum Jump:


Users browsing this thread: 1 Guest(s)