User Tag List

Results 1 to 5 of 5

Thread: file load works in test, doesn't work when built (in the same folder) - ??

  1. #1
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    swerdmurd's Avatar
    Join Date
    Apr 2013
    Location
    Austin, TX
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    file load works in test, doesn't work when built (in the same folder) - ??

    All right... so I'm having incredibly bizarre, nonsensical changes in program behavior between testing in-editor and compiling the .exe.

    My game, when run, sets the ini file, then immediately checks if "filevalid" is equal to 1. If the ini doesn't exist (which is the only way this variable can equal 0), the game bypasses loading from the .ini and sets initial values manually.

    START OF FRAME -> set ini file to "filename.ini", set filevalidator global var to "filevalid" (from ini)
    If filevalidator = 1 + RUN ONCE -> load all game data from ini into global variables.
    If filevalidator = 0 + RUN ONCE -> bypass data load, manually set all variables to initial values.

    This works every time. I don't set "filevalid" until the user closes the app, which triggers (on "close window has been selected", or ctrl+Q) KILL FRAME, which loops through and saves all settings/high scores. filevalid is set to 1 here - this also works every time.

    When I'm in the editor, the next time I load the game it properly finds the filevalid set to 1, loads the data in from the file, and all is well!

    When I compile and run however, it correctly sets filevalid to 1, but every other value in the .ini has been set to 0. I have no clue what's doing this - when I open the .ini file after the game closes the first time all the values are properly set. Somehow my load operation is setting everything to 0, which then saves everything to 0 as soon as I close the app again.

    I cannot figure this out for the life of me. I'm even putting the compiled .exe in the same folder that the in-editor version is using to access the .ini, but no dice.

    Anyone have any clue what could be going wrong? I can't use the debugger, as it functions fine in editor, and I know for a fact the folder isn't access-restricted - ran in several different locations just to be sure....this is infuriating

  2. #2
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    919
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I know it's frustrating, but I would re-check the folder where your .exe and maybe .mfa projects are saved and make sure they're the same. I had a similar problem before where whenever I ran an .exe from a folder on my desktop it'd work but running it from the MMF2 project it wouldn't load the same external files even though it should have as far as I thought because I compiled the .exe to that very same folder on my desktop.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    swerdmurd's Avatar
    Join Date
    Apr 2013
    Location
    Austin, TX
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm having the inverse problem (works in mmf2 project, .exe 0's out) - but it could very well be symptomatic of the same thing.

    How'd you solve the problem?

    I'm gonna replace Apppath$+"bz1data.ini" with a static file path... I still can't see why that would help, since it's able to save the data to the correct path in .exe, and load path is the exact same....

    How the hell do people have the patience to debug!?

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    swerdmurd's Avatar
    Join Date
    Apr 2013
    Location
    Austin, TX
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wooooow.

    Finally found it. I'm a complete and total moron. Isn't coding great for the self esteem!?

    So idk if this'll help anyone else... But the problem was that I had a global event (that had been sitting in the game for over a month - totally forgot about it) that was setting the filepath to AppTempPath$ on start of app. This wasn't an issue in the mmf2 project, as apparently AppTempPath$ and AppPath$ reference the same folder in-editor. However, once executed, these folder-finder-strings point to differenet places, hence only seeing evidence of this issue when i compiled and ran the program.

    So:

    Lesson 1) Don't forget to check your global events... even if you don't think you've used any. You might have forgotten that one, kinda drunken night, where you haphazardly tried to change the logic of your data loading and failed.

    Lesson 2) AppTempPath$ and AppPath$ are THE SAME while running the mmf2 project in the editor, but different once you've compiled and run the .exe

    Lesson 3) swerdmurd needs to exhaust all his options before crying to the forums.

    Thanks for putting up w/ this all... I swear I'll transition into the helpful guy on the forums once I get better w/ this software!

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,707
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    swerdmurd. You're not a moron and your experiences help other forum members. Oh, and thanks for sharing those lessons.

    Marv
    ​455 MMF2 & CTF 2.5 Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

Similar Threads

  1. Load on call doesn't work on android
    By Jack133 in forum Android Export Module Version 2.0
    Replies: 9
    Last Post: 30th July 2013, 08:41 AM
  2. Mac build doesn't run but java file works
    By MTCMusic in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 23rd July 2012, 06:23 AM
  3. Built 251 Mouse button (shooting) doesn't work
    By Evilized79 in forum SWF/Flash Export Module Version 2.0
    Replies: 9
    Last Post: 17th February 2011, 05:38 PM
  4. Works & Then Doesn't Work
    By drnebula in forum Vitalize
    Replies: 4
    Last Post: 4th June 2009, 09:09 PM
  5. Load Frame on actives doesn't work?!
    By MechatheSlag in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 10th June 2008, 09:03 PM

Tags for this Thread

Posting Permissions

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