Dini won't check if the file exists
#1

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

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
    }
Reply
#3

Another stupid mistake by me, lol. Thankyou
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)