User Tag List

Results 1 to 6 of 6

Thread: loading array problem saga

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Aug 2016
    Location
    Utah, USA
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question loading array problem saga

    Hi, I'm back. I figured out those strange values some of you like Decal were seeing- when I tried to make a mini version of the application it would not copy the global values or strings and just inserted these weird letter values. Then the program got stuck in an error loop. So I ended up choping up the original and doing a save as, so this should have all my global values and strings and no weird values. One weird thing that has happened is that on all frames my ini used to load a hello player name text at the top but now the player name has disappeared. So I'm thinking I definitely have done something wrong to make things not load at all. Thank you in advance to anyone willing to check this out. https://www.dropbox.com/s/997p3egur3...ihelp.mfa?dl=0

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    904
    Mentioned
    43 Post(s)
    Tagged
    0 Thread(s)
    Hi Cathy,

    I downloaded your game and looked at the array loading routine for player 1 name as an example in your game (array frame, line 10). Just wanted to see if there's really a problem with the saving/ loading itself.
    Saving works as you coded it, the arrays are generated in the AppData directory correctly. But loading does not.
    I then modified the loading trigger event to just a button press cuz I did not understand at all how you're trying to initialize the loading loop. Good thing: Saving and loading works! But there must be some stuff wrong in the way you try to initialize your loading loop. To show the string from the array is loaded correctly I just put another string object in the frame's corner that shows the correctly loaded player name.
    You also should comment your code a lot more, this is a little nightmare to read

    Here's the modified .mfa: https://www.dropbox.com/s/s67uealnar...ooter.mfa?dl=0

    edit: one debugging tipp for checking if an event even triggers is to attach a sound FX to it so you can decide wheter you've to spot a problem in your trigger-event (as in your game, at least in the array frame) or if one of the actions is not executed correctly for some other reason (you assumed a problem with data access or a wrong path specification, wich is actually not the case).

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1 : The INI object for some reason wouldn't want to write if its put in "Start of Frame" I had to put it in a seperate event that is "Run this event once" instead of "Start of Frame" to make it work.


    2 : You jump to "reward" frame before saving to the array.


    3: You save the Fixed number of the Lives object to the array, instead of the number of lives you have which is found under "Player 1"


    4: You have no code where you actually load any data from the array. All you do with the array during "playlevel1" is to write to it. If you want to load from it, you need to at the start of the frame set lives, score etc to the values written in the array. There are no events for this.


    5: Finally the loading of the array itself is quite a mess. I'm not sure what you are trying to do, but the load group is under the save group which is deactivated. This group gets activated when you save, meaning you could only load when you press the save button.


    On top of that the events to load the array file is "Player 1 = StrAtX( "SlotArray", 1 )". This event will never fire because you can't read from the array before you load from it. Here you are trying to read part of the array to see if it matches the global string "Player 1" and if it matches, then you load the array files. Which of course will not work.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    650
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Cathy, I tested the hello player name text on 2 Frames.
    You can test your example with the changes below and make sure to remove the Frame transitions.
    After player name entry, check if your config.ini is at the right location (Windows drive\Users\username\AppData\mygame\config.ini)
    You can also replace the name input saving with an Array if you want.

    Frame 2 (Startscreen) → remove transitions
    line 2:
    Start of Frame
    (Ini object)Set current file:
    AppDataDirectory$( "File" ) + "\mygame\config.ini"
    delete the event (File object) Create the directory AppDataDirectory$( "File" ) + "\mygame\"

    Frame 7 (playlevel1) → remove transitions
    line 8:
    Start of Frame
    (Ini object)Set current file:
    AppDataDirectory$( "File" ) + "\mygame\config.ini"

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    650
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I didn't saw the other posts until now.

    Quote Originally Posted by Decal View Post
    1 : The INI object for some reason wouldn't want to write if its put in "Start of Frame" I had to put it in a seperate event that is "Run this event once" instead of "Start of Frame" to make it work.
    Alright - this is the proof now. The issue is because of the Frame transitions.

    So, either remove the transition effects or better - as suggested by Decal, find another solution and use events which are not related to Start of Frame.

    Quote Originally Posted by Julian82 View Post
    one debugging tipp for checking if an event even triggers is to attach a sound FX to it so you can decide wheter you've to spot a problem in your trigger-event (as in your game, at least in the array frame) or if one of the actions is not executed correctly for some other reason (you assumed a problem with data access or a wrong path specification, wich is actually not the case).
    I use sounds in this way very often for debugging purposes.
    It's very useful in some situations - for example if you are unsure if things work as they should or also to understand better what is going on in your code.

    Edit:
    btw I'm almost certain that this font Trajan 3 Pro does not come with Windows installation/except this is a special update or Windows 10 specific...
    It's probably from another Software. For people(like me ) who don't have this font installed most text characters will be just rectangles, you don't see what you type etc.
    Perhaps you can choose a font which most users have installed, use other fonts with the right license and include it for the user or create your own font.

  6. #6
    Clicker Fusion 2.5 Developer

    Join Date
    Aug 2016
    Location
    Utah, USA
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks everyone! This is a lot to digest, but its great. I'm not a programmer so its not a surprise that my code is sort of a nightmare- sorry. I'm actually an artist wanting to make games and having to learn to be a programmer to do it. Sounds like I have a lot to fix, but I don't mind, at least there is an answer. Thank you all for helping me.

Similar Threads

  1. continued array loading problem
    By cathy_1966 in forum Fusion 2.5
    Replies: 9
    Last Post: 22nd November 2017, 11:36 AM
  2. Loading an object from array when needed (loading an array in chunks)
    By fishrod in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 20th March 2014, 06:01 PM
  3. Problem with saving/loading an NVO array file from the Named Variable object?
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 12th January 2012, 01:17 PM
  4. Problem with array loading/saving with INI++
    By timcclayton in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 21st November 2010, 06:21 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
  •