JesterOC
Member
So i'm having an issue...
My script below uses GMFileSystem extension...
It's supposed to copy a file from inside some folders in working_directory....
However, it shows my message "No OUT file"
meaning the file didn't get copied out of the sandbox.
FS_file_copy() and/or FS_file_exists() MUST be the culprit...
I just don't know why...
global.DriveLetter + /ShootAndLoot/SavedChars exists as far as FS_directory_exists() is concerned, and i ca see it at C:/ShootAndLoot/SavedChars...
I've tried everything I can think of....
- Changed backslashes to forward slashes...
- removed the slash on the end of folderdood... and added when needed...
- removed working_directory from FS_file_copy...
I'm using version 1.4.4a of the extension found here.
Any help or suggestions would be much appreciated...
Edit: fixed it by replacing
working_directory
with
game_save_id
My script below uses GMFileSystem extension...
It's supposed to copy a file from inside some folders in working_directory....
However, it shows my message "No OUT file"
meaning the file didn't get copied out of the sandbox.
FS_file_copy() and/or FS_file_exists() MUST be the culprit...
I just don't know why...
Code:
///FS_COPY_SafeSaveFile_OUT(number, SAVETYPE)
var copyNum = real(argument0);
var saveType = argument1;
var BS = "/";
var folderdood = "ShootAndLoot/SavedChars";
var filenamedood = "SavedChar"+string(copyNum);
if saveType == SAVETYPE.gun{
folderdood = "ShootAndLoot/SavedGuns";
filenamedood = string(copyNum)+".CUSTOM_GUN"
}
else if saveType == SAVETYPE.gunMap{
folderdood = "ShootAndLoot/SavedGuns";
filenamedood = string(copyNum)+".CUSTOM_GUN_MAP"
}
if directory_exists(working_directory+folderdood)
{
if file_exists(working_directory+folderdood+BS+filenamedood)
{
FS_file_copy(
working_directory+folderdood+BS+filenamedood,
global.DriveLetter+folderdood+BS+filenamedood
)
//check for the copy
if FS_file_exists(global.DriveLetter+folderdood+BS+filenamedood)
{return true}else{show_message("No OUT file")}
}else{show_message("No sandbox file")}
}else{show_message("No dir")}
return false;
global.DriveLetter + /ShootAndLoot/SavedChars exists as far as FS_directory_exists() is concerned, and i ca see it at C:/ShootAndLoot/SavedChars...
I've tried everything I can think of....
- Changed backslashes to forward slashes...
- removed the slash on the end of folderdood... and added when needed...
- removed working_directory from FS_file_copy...
I'm using version 1.4.4a of the extension found here.
Any help or suggestions would be much appreciated...
Edit: fixed it by replacing
working_directory
with
game_save_id
Last edited: