Saving an report into a .txt file at scriptfiles (+rep)
#6

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
@Above: Check the file handle otherwise you're going to have problems with server crashes and it's recommended NOT to use strcmp..

pawn Код:
CMD:bugreport(playerid, params[])
{
    if (isnull(params)) return SendClientMessage(playerid, -1, "Usage: /bugreport <Description>");
   
    new
        File: log = fopen("reports.txt", io_append);
   
    if (!log) return SendClientMessage(playerid, -1, "Something went wrong. Please try reporting it later");
   
    fwrite(log, params);
    fwrite(log, "\r\n");
    fclose(log);
    return 1;
}
thanks bro +Rep to all
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)