Create a file in a place other than scriptfiles
#1

Hey guyz. Thanks for clicking!
I am using dini and I made a house system that saves in a file called houses.ini
But when i make the file it creates in scriptfiles folder. That is all fine but with a server that gets up to 80 players daily, it is taking long time to load that file and is causing bugs.

Is it possible to make a new folder called "HousesFiles" and store houses.ini inside that?
If it is please make a code.

Thanks guyz
Reply
#2

Create w folder in scriptfiles and use this
Код:
format(str,128,"/HousesFiles/%s.ini",nick);
dini_Create(str);
Reply
#3

I dont want a folder in scriptfiles.
I want it like somewhere else.
Reply
#4

i dont think there is a way to change to other than scriptfiles
Reply
#5

I'm not 100% sure about this but perhaps you can use ".." when referring to a directory to save to. Using ".." means go up a directory.

For example, to refer a folder called HouseFiles in the main server directory:
Код:
format(str,128,"/../HouseFiles/%s.ini",nick);
dini_Create(str);
It works on Windows, like if you type "C:\Program Files\..\Windows", it will go to "C:\Windows". It might work that way too, but I'm not really sure, try it though if you want. It also works on most operating systems, if not all, including Mac OS X: "The world's most advanced useless operating system!"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)