y_ini parsefile not working
#1

Hi, i have this code:
Code:
new UserAccount[45];
format(UserAccount, sizeof(UserAccount), UserAccFile, PlayerName(playerid));
INI_ParseFile(UserAccount, "UserAccount_%s_%s");
SetPVarInt(playerid, "IsLogged", 0);
if(strcmp(inputtext, PInfoA[playerid][pPassword], false, 16)) // Can't use sizeof
{
	SetPVarInt(playerid, "IsLogged", 1);
	//print(PInfoA[playerid][pPassword]);
	print("User loggedIn");
}
else
{
	SetPVarInt(playerid, "MaxLoginTry", GetPVarInt(playerid, "MaxLoginTry")+1);
	ShowPlayerDialog(playerid, DIALOG_LOGIN, DSP, "Auth", "Wrong pass!\nВWrite pass:", "Join", "");
}
Code:
forward UserAccount_Account_UserAccount(playerid, name[], value[]);
public UserAccount_Account_UserAccount(playerid, name[], value[])
{
	INI_String("Password", PInfoA[playerid][pPassword], 16); // sizeof error
	INI_Int("Team", PInfoA[playerid][pTeam]);
	INI_Int("Level", PInfoA[playerid][pLvl]);
	INI_Int("Exp", PInfoA[playerid][pExp]);
	print("UserAccount loader");
	return 1;
}
Function from parsefile does not start.
No errors, how can i fix it?
Reply
#2

bump
Reply
#3

Fixed.
Quote:

INI_ParseFile(GetAccountPath(playerid), "UserAccount_%s", .bExtra = true, .extra = playerid);

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)