SA-MP Forums Archive
Creating files from script in npcmodes folder - 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: Creating files from script in npcmodes folder (/showthread.php?tid=278717)



Creating files from script in npcmodes folder - Jochemd - 23.08.2011

Hello,

I think my question is clear. How can I create files in another folder such as npcmodes? I tried this;

pawn Code:
format(str,sizeof(str),"../npcmodes/%s.pwn",filename);
But I am unsure it works. Since server is crashing on this line...

pawn Code:
format(str,sizeof(str),"#define RECORDING \"%s\"",filename);
        print("8");
        fwrite(file,str);
... and this is the first write.

Jochem


Re: Creating files from script in npcmodes folder - Pinguinn - 23.08.2011

I think it only allows you to write in scriptfiles


Re: Creating files from script in npcmodes folder - Jochemd - 23.08.2011

Not sure. That is why I am asking here.

Edit: It works when I write to scriptfiles itself. So it's not possible this way.

It should be able to do with a simple plugin, I think.