I am trying tosave file to a directory using simply naming "Directory/filename.end" ie. '
OpenFile(1, "directory/filename.end", #MODE_WRITE)
It however fails.
Am i doing something wrong, or is this a windows problem, and if it is a windows problem (permission problem) then is there anything i can do within hollywood so that people using it on their machines would get it to work the way it is intended, or should i revert to saving everything to just the main folder in windows machines?
Save file to directory. (OpenFile #MODE_WRITE command)
Re: Save file to directory. (OpenFile #MODE_WRITE command)
Bugala wrote:I am trying tosave file to a directory using simply naming "Directory/filename.end" ie. '
OpenFile(1, "directory/filename.end", #MODE_WRITE)
It however fails.
Am i doing something wrong, or is this a windows problem, and if it is a windows problem (permission problem) then is there anything i can do within hollywood so that people using it on their machines would get it to work the way it is intended, or should i revert to saving everything to just the main folder in windows machines?
openfile() expects a string. Yow need to concatonate the string. (Directory .. "/" .. filename.end). Or just change directory first to your destination directory with changedirectory().
- Juan Carlos
- Posts: 887
- Joined: Mon Sep 06, 2010 1:02 pm
Re: Save file to directory. (OpenFile #MODE_WRITE command)
With Changedirectory is more easy, other problem when you copy a file with the same name, overwrite it. The rename file also has a problem when there is a file with the same name.
Re: Save file to directory. (OpenFile #MODE_WRITE command)
Ah, didnt know about that ChangeDirectory command, will check from manual about that command. It will probably solve the problem. Thanks zylesea and Juan Carlos.