30.11.2014, 07:48
I don't understand why you would need to use format in the bool write function why not just do this.
Don't limit precision of floats!
INI_Copy has a critical bug.
If you try to copy a file that does not exist the write file is not closed! Same issue with INI_Rename()
Another thing is make sure you do all tests on a RamDisk so access times are completely minimized.
There is probably other stuff as well, but those are what I noticed before hitting the sack.
pawn Код:
stock INI_WriteBool(const key[], bool:value)
{
if(value) return INI_WriteString(key, "1");
return INI_WriteString(key, "0");
}
pawn Код:
format(dest, sizeof(dest), "%0.4f", value);
pawn Код:
h = fopen(gFile[E_FILENAME], io_read);
g = fopen(copyname, io_write);
if (!h) return false;
if (!g) return false;
Another thing is make sure you do all tests on a RamDisk so access times are completely minimized.
There is probably other stuff as well, but those are what I noticed before hitting the sack.