Factions not loading. - 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)
+--- Thread: Factions not loading. (
/showthread.php?tid=349722)
Factions not loading. -
cloudysky - 09.06.2012
pawn Код:
new Factionfile[256];
for(new i = 0; i < MAX_FACTIONS; i++)
{
format(Factionfile, sizeof(Factionfile), "factions/%s.ini", i);
if(fexist(Factionfile) )
{
Basically I'm trying to load the faction by it's name but alas it is not loading and I've debugged it to these lines. Can anyone see what is wrong with them?
Re: Factions not loading. -
JhnzRep - 09.06.2012
Make the file names numbers, not strings.
Re: Factions not loading. -
cloudysky - 09.06.2012
But if i wanted to keep the file as a string
Re: Factions not loading. -
JhnzRep - 09.06.2012
Then you would have to specify the name of the file in the script(There would be another way you could POSSIBLY do it, but it would take a lot of explaining).