[Include] [INC]BFX Ini System - Cache Based
#1

Hi All,

This system works on cache, these can either be changed or read, on the end can everything stored & closed, no unnecessary access to the File


>> Functions >>

Code:
OpenINI(const file[]);
o Reads the File and Load it into the Cache / Vars


Code:
ReadStringKey(const keyname[]);
o Read the Key as String


Code:
ReadFloatKey(const keyname[]);
o Return the Key as Float


Code:
ReadIntKey(const keyname[]);
o Return Key as Integer


Code:
SetKeyString(const keyname[],const value[]);
o Set the Key as String


Code:
SetKeyInt(const keyname[],const value);
o Set the Key as Integer


Code:
SetKeyFloat(const keyname[],const Float:value);
o Set the Key as Float


Code:
SaveINI();
o Save all Values in Cache to File


Code:
CloseINI();
o Close the File ( Clean the Cache )

Code:
KeyIsSet(const keyname[]);
o Check the Key


Code:
UnsetKey(const keyname[]);
o Remove the Key


Code:
CreateINI(const file[])
o Create a File


This System can Read Keys from Dini & SII Systems , Have Fun ^^


Test :

Code:
if(OpenINI("Filename.ext"))
{
SetKeyString("Keyname","Hello World");
printf("The Key Value ist : %s",ReadStringKey("Keyname"));
SaveINI();
CloseINI();
}
* Changes 1.Feb 2010 *
One Core Function Updated

Reply
#2

Nice Script, I already used it and it works nice.
Reply
#3

I'm using but not read more :S
Reply
#4

Nice INC but tell why should we use it? Because people use DJson or Dini
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)