SA-MP Forums Archive
y_ini parsefile not working - 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)
+--- Thread: y_ini parsefile not working (/showthread.php?tid=525762)



y_ini parsefile not working - XakepSDK - 13.07.2014

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?


Re: y_ini parsefile not working - XakepSDK - 13.07.2014

bump


Re: y_ini parsefile not working - XakepSDK - 13.07.2014

Fixed.
Quote:

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