Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Select Directory


Recommended Posts

Hi I was wondering how I can change this expression to how it would save to a seperate folder in the Applications directory in MMF:

Appdir$ + "SaveFile" + Str$( File Number ) + ".sav"

I'm trying to save the array of my game into a seperate folder, in the applications directory. Can anone show me how to do this?

Thanks :)

Link to comment
Share on other sites

Here's what you should be doing instead:

".\SaveFile" + Str$( Value( "File Number" ) ) + ".sav"

By adding '.\', you're saying to use the directory of the application. It does the same as what you put. Now here's something you could do to access a subfolder in the application directory:

".\Saves\File" + Str$( Value( "File Number" ) ) + ".sav"

As you can see, I simply put the name of the folder and added a '\' to seperate the file name. Make sure the slash is in that direction. Also, you can continue to list the names of folders to access a file in a sub-subdirectory and stuff like that.

Link to comment
Share on other sites

Try this?

Appdrive$ + Appdir$ + "Savings\SaveFile" + Str$( File Number ) + ".sav"

Make sure a folder called 'Savings' is made in the game's directory. Also, I included 'Appdrive$' since you want to make sure it's saved in the correct drive.

Link to comment
Share on other sites

Create a text object, and set the alterable string to check what it says. You may need to add a slash or so. I'm not sure, I dont know how MMF handles it, but often, like in the GNU C library, getcwd returns the path without the last slash appended. So as a example, the above would result in:

C:\GamedirSavings\Savefile000.sav

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...