Posts: 484
	Threads: 49
	Joined: Feb 2011
	
	
 
	
	
		Is it posible to make this with y_ini, and how to... 

Thank you.
pawn Код:
public KickLog(string[])
{
    new entry[200];
    format(entry, sizeof(entry), "%s\r\n",string);
    new File:hFile;
    hFile = fopen("/Logs/kick.log", io_append);
    fwrite(hFile, entry);
    fclose(hFile);
}
 
	 
	
	
	
		
	
 
 
	
	
	
		
	Posts: 239
	Threads: 1
	Joined: Jul 2010
	
Reputation: 
0
	 
 
	
	
		Why would you want a log file stored in a key=value format?
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 267
	Threads: 64
	Joined: Jul 2010
	
Reputation: 
0
	 
 
	
	
		so for the logs the best solution ( fast read and write) is the function sa:mp?
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 2,524
	Threads: 109
	Joined: Sep 2009
	
Reputation: 
0
	 
 
	
	
		Unless you want a log file in the "key = value" format like JamesC said, don't use y_INI for logs. You are better using the native file functions, which are alot faster than any file system arround.
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 267
	Threads: 64
	Joined: Jul 2010
	
Reputation: 
0
	 
 
	
	
		ok thank.
With y_ini we can save the files in .CFG instead to .INI because my old files are in cfg. Whats the different between both?
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 2,524
	Threads: 109
	Joined: Sep 2009
	
Reputation: 
0
	 
 
	
	
		It's alright to use .cfg files, you can do it with y_INI too, the extension is not very important.