File does not exists, my script says -.-. But it actually does
#1

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
Reply
#2

you check if str exists not fstr
Reply
#3

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

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

Oyeah my bad. Thanks, both of you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)