SA-MP Forums Archive
Filesize - 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: Filesize (/showthread.php?tid=251144)



Filesize - sebacol - 25.04.2011

How can I get filesize in bytes on Linux?
I want to see file size while server is recording player's data.

here is the code I've made:
format(form, 256, "stat -c %ss scriptfiles/%i.rec", "%%", playerid);
system(form, string, sizeof(string));

When I run this code, server crashes?!

I tryed checking filesize from ssh with same command and it works fine.

Please help me fix this code or find other option to get filesize.


Re: Filesize - sebacol - 26.04.2011

anyone with the idea?