SA-MP Forums Archive
File does not exists, my script says -.-. But it actually does - 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: File does not exists, my script says -.-. But it actually does (/showthread.php?tid=259596)



File does not exists, my script says -.-. But it actually does - Kwarde - 05.06.2011

Hi, I have a small annoying problem. I continued with my new gamemode, now with the usersystem. While the userfile exists, it says it doesn't. The script:

pawn Код:
format(fstr, 40, "KRLG/Users/%s.cfg", PlayerName[playerid]);
if(fexist(str))
{
    format(str, 128, "Hi %s!\r\nThis account has been detected in our database.\r\nPlease type the password for this account, or choose another name (no need to relog)", PlayerName[playerid]);
    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", str, "Login", "NameChange");
}
else
{
    format(str, 128, "Hi %s!\t\nThis account hasn't been registered yet.\r\nYou can either give a password so only you have access to this account, or you just go play with less features and no saves of your stats", PlayerName[playerid]);
    ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Register", str, "Register", "Play");
}
The first time it went correct (before the file existed). I registered. But after the relog it still said "This account hasn't been registered yet" -.-. And I am f*cking sure that the "KRLG/Users/Kevin_Warde.cfg" exists (that's my IG name).
Does anyone have a clue why this is happening to me? :S

- Kevin


AW: File does not exists, my script says -.-. But it actually does - Nero_3D - 05.06.2011

you check if str exists not fstr


Re: File does not exists, my script says -.-. But it actually does - Elka_Blazer - 05.06.2011

Replace
pawn Код:
if(fexist(str))
with

pawn Код:
if(fexist(fstr))



Re: File does not exists, my script says -.-. But it actually does - Kwarde - 05.06.2011

Oyeah my bad. Thanks, both of you.