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



Problem : files - Urefeu - 09.07.2012

Hello.

For my server, I have a backup system by files. I have a users folder in the scriptfiles folder, in which a file is a member.

In my script, I often need to retrieve or modify data in the files of members.

I want to know which of these ways is the most ergonomic, one that requires less time to retrieve or modify data :

- Open the file member when it connects and close the file when it disconnects.

- Open the file when I need to retrieve or change information, then close it.

The second method would not take me more lines, because I would use a function.

What do you think about it ?

Thanks in advance !

Cordially.


Re: Problem : files - Roko_foko - 09.07.2012

Use second, otherwise the files will mess up