View Single Post
a simple .ini parser
Old
  (#1)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default a simple .ini parser - 02-01-2005

its code isn't very "clever"... but it's enough to be used with bots:
http://cvs.sourceforge.net/viewcvs.p...pp?view=markup
http://cvs.sourceforge.net/viewcvs.p....h?view=markup

(I'm licensing this code under GNU GPL with the special exception to link against the HLSDK)

using is very simple:

PHP Code:
#include "ini.h" // at the top of your source file

CIniFile ini("test.ini"); // load an ini file
printf("%s\n"ini.Get("SECTION""Item")); // read a item from the file
ini.Set("SECTION""Item""Value"); // write a value to the ini
ini.Save("filename.ini"); // save the ini file 

Last edited by Whistler; 02-01-2005 at 08:12..
  
Reply With Quote