easy error
#2

put this in your script.

pawn Код:
/**
 *  Copies a textfile (Source file won't be deleted!)
 *  @param   oldname
 *           newname
 */

stock fcopytextfile(oldname[],newname[]) {
    new File:ohnd,File:nhnd;
    if (!fexist(oldname)) return false;
    ohnd=fopen(oldname,io_read);
    nhnd=fopen(newname,io_write);
    new tmpres[MAX_STRING];
    while (fread(ohnd,tmpres)) {
        StripNewLine(tmpres);
        format(tmpres,sizeof(tmpres),"%s\r\n",tmpres);
        fwrite(nhnd,tmpres);
    }
    fclose(ohnd);
    fclose(nhnd);
    return true;
}
Reply


Messages In This Thread
easy error - by noamch1997 - 09.08.2015, 21:12
Re: easy error - by jamesbond007 - 10.08.2015, 00:08
Re: easy error - by Maximun - 10.08.2015, 00:10
Respuesta: Re: easy error - by Dreyfuz - 10.08.2015, 01:03

Forum Jump:


Users browsing this thread: 2 Guest(s)