just built a small include which manages files (unpacked strings only) including INI standarts. functions:
structure of a fileCode c:native INI::Create(const path[],bool:overwrite=false); native INI::Remove(const path[]); native INI::Copy(const oldpath[], const newpath[],bool:delete_oldpath=true,bool:overwrite=false); native INI::GetValue(const path[],const key[],const section[]=''''); native INI::GetValueAsInt(const path[],const key[],const section[]=''''); native Float:INI::GetValueAsFloat(const path[],const key[],const section[]=''''); native bool:INI::GetValueAsBool(const path[],const key[],const section[]=''''); native INI::SetValue(const path[],const key[],value[],const section[]); native INI::SetInt(const path[],const key[],value,const section[]); native INI::SetFloat(const path[],const key[],Float:value,const section[]); native INI::SetBool(const path[],const key[],bool:value,const section[]);
comments can be set at the beginning of a line only (';' has to be the first character, can be changed with COMMENTVAULTCHARACTER). every section can be used only one time and every key in a section has a unique name - but two or more key can have the same name if theyre in different sections. by default the system works case insensitivity but you can toggle it with "IGNOREVAULTCASE".Code ini:; Comment [Section] key=value
usage example:
Code ini:; Userfile.ini [General] name=Asdf age=18 logins=1 [InGame] class=Human age=38 dead=false [Position] x=1363.00 y=5479.00 z=7844.13download: https://dl.dropbox.com/u/93111829/Va...nloads/INI.incCode c:#include <INI> new logins = INI::GetValueAsInt(''Userfile.ini'',''logins'',''General''); INI::SetInt(''Userfile.ini'',''logins'',++logins,''General''); new Float:x = INI::GetValueAsFloat(''Userfile.ini'',''x'',''Position''); new Float:y = INI::GetValueAsFloat(''Userfile.ini'',''y'',''Position''); new Float:z = INI::GetValueAsFloat(''Userfile.ini'',''z'',''Position''); SetPos(ID,x,y,z);
not all functions are tested so please give feedback if it works