SA-MP Forums Archive
Which method is better for loading/saving? - 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: Which method is better for loading/saving? (/showthread.php?tid=516507)



Which method is better for loading/saving? - nikitasicek - 31.05.2014

Hi guys,
Which of these methods do you recommend for loading pricelist of products of the property? Loading from files every time the players wants to show pricelist or save it to the variables from files at ongamemodinit or loading it from mysql database every time the player want to show pricelist?

The owner of the property can change the prices that's why I need to save/load it often.

I just want the best optimalization and I don't know which of these methods is the best.


Re: Which method is better for loading/saving? - Aerotactics - 31.05.2014

I would say looping through each save file for getting price.