SA-MP Forums Archive
[AJUDA] undefined symbol "DINI_fcopytextfile" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] undefined symbol "DINI_fcopytextfile" (/showthread.php?tid=258782)



[AJUDA] undefined symbol "DINI_fcopytextfile" - wallacematheus - 01.06.2011

como eu defino isso?

a linha й essa
pawn Код:
getdate(v[0], v[1], v[2]);
        gettime(v[3], v[4], v[5]);
        format(string, 128, "[%d/%d/%d] [%d:%d:%d] %s Apagou a conta: %s", v[2], v[1], v[0], v[3], v[4], v[5] , PlayerName(playerid), tmp);
        AComandosLog(string);
        format(file,sizeof(file),"Players/%s.ini",tmp);
        format(string, 128, "%s.bak", file);
        DINI_fcopytextfile(file, string);
        fremove(file);
        return 1;
    }



Re: [AJUDA] undefined symbol "DINI_fcopytextfile" - [S]trong - 01.06.2011

pawn Код:
stock DINI_fcopytextfile(oldname[],newname[]) {
    new File:ohnd,File:nhnd;
    if (!fexist(oldname)) return false;
    ohnd=fopen(oldname,io_read);
    if (!ohnd) return false;
    nhnd=fopen(newname,io_write);
    if (!nhnd) {
        fclose(ohnd);
        return false;
    }
    new tmpres[DINI_MAX_STRING];
    while (fread(ohnd,tmpres)) {
        DINI_StripNewLine(tmpres);
        format(tmpres,sizeof(tmpres),"%s\r\n",tmpres);
        fwrite(nhnd,tmpres);
    }
    fclose(ohnd);
    fclose(nhnd);
    return true;
}
crйditos DracoBlue.