fwrite help!!
#1

K title says it.
I need help.
What I want to do:

I'm using this:
pawn Код:
IRCCMD:suggest(botid, channel[], user[], host[], params[])
{
    new msg[512];
    format(msg, sizeof(msg), "[%s]: %s\r\n", user, params);
    new msg2[32];
    format(msg2, sizeof(msg2), "/suggestions/%s.txt", user);
    new File:example = fopen(msg2, io_write);
    fwrite(example, msg);
    fclose(example);
    format(msg, sizeof(msg), "4Suggestion sent! Please be patient, an admin will contact you soon!");
    IRC_GroupSay(gGroupID, channel, msg);
    return 1;
}
to save things.

But when a user types the command to times, it always overwrites the old thing.
How to make it that it always start a line below the old one?
Reply
#2

Use io_append instead of io_write
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)