Can you tell me whats wrong with my factions?
#1

hey here is the code that is supposed to save my factions information...
Код:
public SaveFactions()
{
  new idx;
	new File: file2;
	while (idx < sizeof(FactionInfo))
	{
	  new coordsstring[512];
	  format(coordsstring, sizeof(coordsstring), "%s|%d|%s|%s|%s|%s|%s\n",
	  FactionInfo[idx][fName],
	  FactionInfo[idx][fType],
	  FactionInfo[idx][fRank1],
    FactionInfo[idx][fRank2],
    FactionInfo[idx][fRank3],
    FactionInfo[idx][fRank4],
    FactionInfo[idx][fRank5]);
    if(idx == 0)
		{
			file2 = fopen("South-WestRP/Factions/factions.ini", io_write);
		}
		else
		{
			file2 = fopen("South-WestRP/Factions/factions.ini", io_append);
		}
		fwrite(file2, coordsstring);
		idx++;
		fclose(file2);
	}
	return 1;
}
Ok for some reason everytime i restart my server none of the factions info saves so im thinking something is wrong in the above code does anyone have an tips for me?
Reply
#2

Yeah, don't use SW RP it's shit.

On topic: check the topic see if anyone has asked this.
Reply
#3

Quote:
Originally Posted by Shady91
Yeah, don't use SW RP it's shit.

On topic: check the topic see if anyone has asked this.
Lol the game mode is fine i worked out the bugs in it and have plenty of players, its just everytime i restart to update changes my factions dont save, but when i look at the log they are all there multiple times. i checked the topic and i can't find anything about a fix for them and no one replies to me on there so i posted here to see if anyone else could help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)