SA-MP Forums Archive
Y_INI help - 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 help (/showthread.php?tid=506236)



Y_INI help - Lidor124 - 12.04.2014

that function check if playername INI file exists in scriptfiles/users.
Warning of tag mismatch:
Код:
if(flength(File) > 0)
what is INI function to check length of a file.

Код:
doesAccountExist(account_name[])
{
	new username[MAX_PLAYER_NAME + 12];
	format(username, sizeof(username), "/Users/%s.ini", account_name);
	if(fexist(username)) 
	{
		new INI:File = INI_Open(username);
		if(flength(File) > 0) // tag mismatch
		{
			INI_Close(File);
			return 1;
		}
		INI_Close(File);
	}
	return 0;
}



Re: Y_INI help - MrCallum - 12.04.2014

Check if the file exist and Empty Ini's are still valid!


Quote:
Millenium Roleplay



Re: Y_INI help - BroZeus - 12.04.2014

use fexist no need for checking lenght of file


Re: Y_INI help - Lidor124 - 12.04.2014

I'm new to Y INI so i hope you understand me
BTW is that possible to load all %s.ini user files from scriptfiles?