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



File system? - Wan - 04.07.2015

Hello!

So... Here's the thing... I'll just say I'm making a map editor. The map editor is saving objects through a for loop:

pawn Код:
for(new objectid = 0; objectid < MAX_OBJECTS; objectid++)
I'm using Dini as a file system, it saves everything perfectly, also loads... I love Dini, it's awesome... But it loads a map with a bigger amount of objects (around 150) really slow and it makes a huge lag about 5-7 seconds (even more)...

I really want to make this system as fast as possible... Suggestions?

P.S: MySQL is not an option.


Re: File system? - Jefff - 04.07.2015

y_ini or normal samp file system fopen - fread - fclose


Re: File system? - SickAttack - 04.07.2015

SQLite would be the best option. It's integrated in SA:MP and documented on the wiki. Go check it out if you decide to give it a chance.


Re: File system? - kyriakos587 - 04.07.2015

you have this to OnGameModeInit?

If you have this i think you have to do

for(new i=0;i<MAX_OBJECTS;i++)
{
new file[50];
format(file,sizeof(file),"SAVE THE FILE",objectid);
if(dini_Exists(file))
{
CreateDynamicObject(..
}}


Re: File system? - PT - 05.07.2015

For that the best thing you can use is SQLite, take an look on Texture Studio from Pottus.