[HELP] Y_files - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Y_files (
/showthread.php?tid=203309)
[HELP] Y_files Error, Please help! -
Gforcez - 26.12.2010
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
Re: [HELP] Y_files -
Gforcez - 26.12.2010
Sorry for bump, But i Really need it!
Re: [HELP] Y_files -
Sascha - 26.12.2010
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
Re: [HELP] Y_files - [L3th4l] - 26.12.2010
pawn Код:
if(fexist(file))
{
// File does exist
}
else
{
// File does not exist
}