As the title says, map_to_file() will not save to a subfolder in /data using any syntax I can think of. Instead, it saves to the main data folder, whether the specified subfolder already exists or not.
map_to_file(array,"subfolder/filename.txt") -> saves to "/data/filename.txt" instead of "/data/subfolder/filename.txt". This definitely used to work, one of my old scripts uses it extensively (though luckily this bug doesn't affect it for people who only Mafia with one account).
file_to_map("subfolder/filename.txt",array) -> successfully loads from the subfolder. But it still can't save to the subfolder.
Not sure if I'm just being dumb, or this is intentional, but it seems buggy.
Example, for completeness:
map_to_file(array,"subfolder/filename.txt") -> saves to "/data/filename.txt" instead of "/data/subfolder/filename.txt". This definitely used to work, one of my old scripts uses it extensively (though luckily this bug doesn't affect it for people who only Mafia with one account).
file_to_map("subfolder/filename.txt",array) -> successfully loads from the subfolder. But it still can't save to the subfolder.
Not sure if I'm just being dumb, or this is intentional, but it seems buggy.
Example, for completeness:
Code:
void main()
{
string[string] testarray;
testarray["test"] = random(1000);
map_to_file(testarray,"testfolder/testfile.txt");
}