Dini won't check if the file exists - 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: Dini won't check if the file exists (
/showthread.php?tid=267855)
Dini won't check if the file exists -
Jack_Leslie - 10.07.2011
I seem to be having all sorts of trouble at the moment with Dini. ^_^
It just keeps thinking the file doesn't exist and makes me re-register.
Код:
gPlayerLogged[playerid] = 0;
new name[MAX_PLAYER_NAME], file[256];
format(file, sizeof(file), SERVER_USER_FILE, name);
if (!dini_Exists(file)) //if player is registered
{
//register dialog
}
else if(dini_Exists(file)) // if player is registered
{
//login dialog
}
Re: Dini won't check if the file exists -
Basicz - 10.07.2011
Because, you didn't stored the Name variable to "GetPlayerName"
pawn Код:
gPlayerLogged[playerid] = 0;
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName( playerid, name, sizeof name ); // Added thiz
format(file, sizeof(file), SERVER_USER_FILE, name);
if (!dini_Exists(file)) //if player is registered
{
//register dialog
}
else if(dini_Exists(file)) // if player is registered
{
//login dialog
}
Re: Dini won't check if the file exists -
Jack_Leslie - 10.07.2011
Another stupid mistake by me, lol. Thankyou