16.07.2013, 11:52
Hi.When i stop server factions is saving(this is normal) but then when i open Factions/factions.ini i see this:
This is my code:
Код:
|||||| ||||||
Код:
forward SaveFactions(); public SaveFactions() { new idx; new File: file2; while (idx < sizeof(TeamInfo)) { new coordsstring[512]; format(coordsstring, sizeof(coordsstring), "%s|%s|%s|%s|%s|%s|%s___________________\n", TeamInfo[idx][TeamName], TeamInfo[idx][fRank1], TeamInfo[idx][fRank2], TeamInfo[idx][fRank3], TeamInfo[idx][fRank4], TeamInfo[idx][fRank5], TeamInfo[idx][fRank6]); if(idx == 0) { file2 = fopen("Factions/factions.ini", io_write); } else { file2 = fopen("Factions/factions.ini", io_append); } fwrite(file2, coordsstring); idx++; fclose(file2); } return 1; }