[HELP] Y_files
#1

Hello, I have a little problem, I want to make something, That checks if the directory already is made,
Now i have this:

pawn Код:
new Dir[128];
    format(AccountFile, sizeof(AccountFile), "/Accounts/%s", AccountInfo[playerid][pAccountName]);

    if(dfind(AccountFile, Dir, sizeof(Dir), 0))
        // Rest of code
But this is giving error: argument type mismatch.
Does one of you guys know how to fix this?

Greetings
Gforcez
Reply
#2

Sorry for bump, But i Really need it!
Reply
#3

just use "fexist" so like:
Код:
format(AccountFile, sizeof(AccountFile), "/Accounts/%s", AccountInfo[playerid][pAccountName]);
if(fexist(AccountFile)){
code for the case that the file exists, here
}
if(!fexist(AccountFile)){
code for the case that it doesn't exist here
}
I hope this is what you need:P
Reply
#4

pawn Код:
if(fexist(file))
{
    // File does exist
}
else
{
    // File does not exist
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)