27.03.2012, 12:29
This can actually become even more effective if you know in which order the lines are written. If you're 100% certain your file will look something like:
You could just immediately take the values in order.
Edit: Also, this code:
Would just be:
The main problem I've got with files though is that it's somewhat hard to edit a point in a file (hence why I'm mainly using MySQL). Good tut, nevertheless.
Code:
user=nakedhoe13 (useless to have something like this in a file tho) pass=unknown admin=-1 money=2020
Edit: Also, this code:
pawn Code:
if(fexist(file)) // Check to see if our file exist
{
fremove(file); // Delete our old file, so we can make the new one.
}
handle = fopen(file, io_append); // Open our handle to append
pawn Code:
handle = fopen(file, io_write);