[Include] INI File Manager + Convertor Include
#10

Quote:
Originally Posted by Pottus
Посмотреть сообщение
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");
}
Ohh, I was just copying and pasting stuff! Didn't notice that could have been much easier!

Quote:
Originally Posted by Pottus
Посмотреть сообщение
Don't limit precision of floats!
pawn Код:
format(dest, sizeof(dest), "%0.4f", value);
Done! (limit removed)

Quote:
Originally Posted by Pottus
Посмотреть сообщение
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()
I didn't understand what you actually mean from that ^^?
(Umm, You mean I didn't closed the copied file...)

Quote:
Originally Posted by Pottus
Посмотреть сообщение
Another thing is make sure you do all tests on a RamDisk so access times are completely minimized.
I'll do that later ^^

Quote:
Originally Posted by Pottus
Посмотреть сообщение
There is probably other stuff as well, but those are what I noticed before hitting the sack.
I am really keen to know those other stuff(s)!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)