User Tag List

Results 1 to 6 of 6

Thread: NEED File Object Help

  1. #1
    No Products Registered

    Join Date
    Dec 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation NEED File Object Help

    Hi, I really need help with a game I am creating, but I cant find a forum or help with it anywhere else so I am posting it here. I have a game created, and on frame load, the game auto - creates 3 directory's in your C:\Drive that contain the GameSave folder (for the gamesave.ini file) and an Instructions folder. I did this with the file object. But I try to make a text file with the file option, but it does not work. I click "File Actions> Create File>testfile.txt" and I have also tried naming the "testfile.txt" as the whole directory i.e. "C:\HealthBar\Instructions\testfile.txt" But that also fails. Can someone please tell me how to create a text file and place it in the Instructions folder? Thanks for the help and sorry if this is confusing :P

  2. #2
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)
    Check for an error and then clear it. The file object wont work anymore till you clear the error.

  3. #3
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Also make sure your "Healthbar\Instructions\" directories exist before trying to create your file.
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Feb 2012
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It might be UAC blocking your attempt to save the file. It's better to create the folders under %AppData% instead.

  5. #5
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleInstall Creator Pro

    Join Date
    Dec 2010
    Location
    United Kingdom
    Posts
    961
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It appears the same thread was double posted on TG2 forums too. Here's what I said on the other one, although mostly already covered here.

    Quote Originally Posted by lh37
    What you are doing would work by creating it in the order, since the file object doesn't create the directories automatically.

    But your problem is to do with saving directly to the C:\ which won't be possible in Windows when UAC (User Account Control) forbids that. A workaround would be running as an administrator but there's a much better way.

    Instead, save to the Application Data (AppData) folder, which can be achieved with the expression Directories --> Application Data directory = AppDataDirectory$( "File" ). This is where other programs will store their settings and storage anyway. Since this is a hidden folder in Windows, type %appdata% in the start menu if you'd like to access this.

    So, replace: "C:\" with AppDataDirectory$( "File" ) and try again.
    eg. Create directory: AppDataDirectory$( "File" )+"\MyApp\" then again for "\MyApp\Healthbar"

    Don't worry, this is the place on the forums for asking questions about Fusion.

  6. #6
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Paul_Boland's Avatar
    Join Date
    Jun 2006
    Location
    Waterford, Ireland.
    Posts
    2,739
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually saving to the C root path isn't affected by the UAC, that only kicks in when you're saving stuff in the Program Files folder, hence the reason I don't make any of my software install there and I use a dedicated KnightTrek Productions folder on c:\. The problem is most likely that the folder you're writing to is not currently created and when the folder path isn't available the file isn't getting made. Check to make sure your folder exists before you try to create the file.
    KnightTrek Productions
    http://www.knighttrek.com

Similar Threads

  1. Create folder with File object on Program File
    By Vantales in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 13th April 2013, 11:13 AM
  2. File Object - Mass/Mulitple File Rename
    By Yelnek in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 29th January 2013, 09:44 PM
  3. Issue with loading file from File Object.
    By XStar in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 1st April 2012, 11:34 AM
  4. File size problem with regular file object??
    By TrojanWolf in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 25th April 2010, 10:39 PM
  5. File object - file selector saving issues
    By Gary_Molton in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 13th November 2006, 08:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •