16.01.2011, 09:21
Hey i made a function that adds lines and basicly it loggs files though its not really doing what it should do..
So basicly when i use this function on a command it writes the stuff but it usally replaces the current string inside the file wtf lol..
E.G
I done /bug apples...
Prints:
Lorenc = apples
After, retype the cmd /bug, i put a different word.
/bug cool, it replaces apples with cool, anyway i can just create a new line and keep writing the strings like a normal one does, thx.
pawn Код:
stock AddLogLine(playername[], filename[], input[])
{
new
string[128]
;
new
INI:ini = INI_Open(filename)
;
format(string, sizeof(string), "%s\n\n", input);
INI_WriteString(ini, playername, string);
INI_Close(ini);
}
E.G
I done /bug apples...
Prints:
Lorenc = apples
After, retype the cmd /bug, i put a different word.
/bug cool, it replaces apples with cool, anyway i can just create a new line and keep writing the strings like a normal one does, thx.