SA-MP Forums Archive
Can you tell me whats wrong with my factions? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Can you tell me whats wrong with my factions? (/showthread.php?tid=150643)



Can you tell me whats wrong with my factions? - firedrumer03 - 27.05.2010

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?


Re: Can you tell me whats wrong with my factions? - shady91 - 27.05.2010

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

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


Re: Can you tell me whats wrong with my factions? - firedrumer03 - 27.05.2010

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