[Include] INI File Manager + Convertor Include
#9

I don't understand why you would need to use format in the bool write function why not just do this.
pawn Код:
stock INI_WriteBool(const key[], bool:value)
{
        if(value) return INI_WriteString(key, "1");
        return INI_WriteString(key, "0");
}
Don't limit precision of floats!
pawn Код:
format(dest, sizeof(dest), "%0.4f", value);
INI_Copy has a critical bug.
pawn Код:
h = fopen(gFile[E_FILENAME], io_read);
        g = fopen(copyname, io_write);
 
        if (!h) return false;
        if (!g) return false;
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.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)