25.10.2010, 09:58
I don't have much time: I'll go on holiday.
But I say: Use "Dini"
You can use that to save all the info you want. Here's a little example:
To read from the file:
This is just an example to use it.
And here's the DINI include: http://dracoblue.net/download-release/35/dini_1_6.zip
I hope this helped you
Kind Regards,
Kwarde
But I say: Use "Dini"
You can use that to save all the info you want. Here's a little example:
pawn Код:
//SAVE A STRING INTO A FILE
if(!dini_Exists("FILE.txt")) dini_Create("FILE.txt");
dini_IntSet("FILE.txt", "LineID", "1"); //To set an INT. For example, in the file 'file.txt' is now this line: "LineID=1"
dini_Set("FILE.txt", "Something", "A string"); //To set an STRING.
dini_FloatSet("FILE.txt", "PosX", "0.00000"); //To set an FLOAT
dini_BoolSet("FILE.txt", "Opened", "true"); //To set an BOOL
//You can use string of course ;)
pawn Код:
if(!dini_Exists("FILE.txt")) return 0;
a_int = dini_Int("FILE.txt", "LineID"); //To get an INT.
a_string = dini_Get("FILE.txt", "Something"); //Wrong. Sorry. Use 'strins'
a_float = dini_Float("FILE.txt", "PosX");
a_bool = dini_Bool("FILE.txt", "Opened") ? true : false;
And here's the DINI include: http://dracoblue.net/download-release/35/dini_1_6.zip
I hope this helped you
Kind Regards,
Kwarde