09.06.2015, 13:48
Quote:
stock FacRemoveMemberFromFile(playerid) { new tmp[MAX_PLAYER_NAME + 2]; if(GetPlayerName(playerid, tmp, MAX_PLAYER_NAME)) { strcat(tmp, "\r\n"); return RemoveTextFromFile("factions/SAPD/SAPDmembers.ini", tmp);} return false; } |
Quote:
stock RemoveTextFromFile(filename[], line){ new count, string[256], File:file, File:temp; file= fopen(filename, io_read); temp = fopen("tmpfile.tmp", io_write); while (fread(file, string)) if (++count != line) fwrite(temp, string); fclose(file); fclose(temp); file= fopen(filename, io_write); temp = fopen("tmpfile.tmp", io_read); while (fread(temp, string)) fwrite(file, string); fclose(file); fclose(temp); fremove("tmpfile.tmp"); return true; } |
Quote:
(2855) : error 035: argument type mismatch (argument 2) |
Quote:
return RemoveTextFromFile("factions/SAPD/SAPDmembers.ini", tmp);} |