User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Array not saving values

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)
    NathanR's Avatar
    Join Date
    Sep 2018
    Location
    Earth
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Array not saving values

    I have a hunch that someone on this forum has asked this exact question before, but I did scouring and I couldn't find a thread that answered my question the least bit.
    It's probably a problem on my part or something, as to everyone else it works flawlessly, but I have array saving and loading set up, with general value checkers on the value (story flag value but in an array, so I can store other values in the x's or y's for other conditions, while also using a single file and a file at all) to determine which story events do and don't happen.
    The thing is, the array never saves the value.
    And if it does, it only saves the value "1", the value I set for it to set when the player starts the game.

    Now, to clarify, I am NOT referring to the saving of the file ITSELF.
    I am asking why the VALUES IN THE FILE are not saving/loading.

    The only conclusion I can come to is that people use the option for the player to choose their save directory. And while I might do that in the future, these values and array are for the main campaign, at least for now. As my game is in the most beta a beta can get, I'm not focusing on the multiple saves just yet.
    I'm also gonna ask, do arrays only save their contents once they start existing? E.g.: will save as a new file with value of 239, but will not overwrite if new value and saved.

    This is a summarization of what code I am using so far, and other developers told me to use .arr, although that didn't change a thing. It might just be because I'm going off what I'm seeing through the file, but I set up Global Value K to be that value, so I have a live preview.
    1.png
    1.png
    The second image is from the Global Events tab, by the way.

  2. #2
    Clicker 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)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,161
    Mentioned
    78 Post(s)
    Tagged
    0 Thread(s)
    It's hard to tell because the Event Editor is hard to read, even though you've annotated the screenshot. Seeing the Event List Editor would make it easier to understand what's going on for someone who's not familiar with your code.

    But one thing I noticed is that you refer to Apppath$+"ini.arr". You're missing a backslash. It should be Apppath$+"\ini.arr"

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)
    NathanR's Avatar
    Join Date
    Sep 2018
    Location
    Earth
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So I added the backslash and I found a little inconsistency with one of my arrays, the y size was 1 instead 500, like the others.
    I fixed those and I built it again under a test name, deleted the ini file, played and closed and reopened, and close to nothing changed? It, compared to when I excluded the backslash, didn't save any values whatsoever!

    Also, at least in Chrome, you can click on the images and open them in a new tab without downloading them.
    I put labels on the images as well.

  4. #4
    Clicker 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)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,161
    Mentioned
    78 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by NathanR View Post
    Also, at least in Chrome, you can click on the images and open them in a new tab without downloading them.
    I put labels on the images as well.
    Yes, of course. But the screenshot is of the Event Editor, where only the conditions are visible, while the actions are replaced by green ticks. Your annotations give only an approximate indication of what those actions are. If there's a bug or a mistake somewhere, we'll probably need to see the actual actions to find it. So taking a shot of the Event List Editor would make it more likely that someone can help you (and would be less work for you since you wouldn't need to make annotations)

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)
    NathanR's Avatar
    Join Date
    Sep 2018
    Location
    Earth
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The actions are to the left of the checks of where they are.
    1.png

  6. #6
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    gkinfinity's Avatar
    Join Date
    May 2011
    Location
    USA
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't use a backslash when I use Apppath$ and it works fine. I did a quick test and confirmed that the backslash is unnecessary because Apppath$ adds a backslash at the end, but it also doesn't seem to cause problems as long as you're consistent (you'll just have 2 backslashes in a row before the ".arr" part).

    As for the actual question, here are some quick array tips that may be causing your problem:

    There are 2 types of arrays - Text arrays and Number arrays. You can only store values or strings in any single array, so make sure your array is set to whatever type you're trying to use. Also make sure that you're using "Write String" or "Write Value" for the appropriate type of array that you're using. If you need to store values and strings into one array, the easiest thing to do is to use a Text array and store values by typecasting them into strings by using Str$([insert number here]), then typecasting back into values later with Val$([insert string that is a number here]).

    Additionally, remember that if Base 1 Index is checked, your arrays will start at X=1. If it isn't, your arrays will start at X=0.

  7. #7
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)
    NathanR's Avatar
    Join Date
    Sep 2018
    Location
    Earth
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All of my arrays are consistent, and I see how adding a backslash before the name would help, as it being a directory, but little to nothing changed.

    Should need be, I will send an mfa of the saving frames isolated.

  8. #8
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    gkinfinity's Avatar
    Join Date
    May 2011
    Location
    USA
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, if you can post a simple MFA that would make it a lot easier to see where you're having issues.

  9. #9
    Clicker 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)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,161
    Mentioned
    78 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by NathanR View Post
    The actions are to the left of the checks of where they are.
    1.png
    Just so you know, you don't need to go the effort of annotating screenshots. Just go to the Event List Editor (ctrl-L) and screenshot that.

  10. #10
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)
    NathanR's Avatar
    Join Date
    Sep 2018
    Location
    Earth
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I deleted everything except the essentials, I doubt anything that was an asset originally influenced it.
    https://www.dropbox.com/s/c64kfufbb4...0test.mfa?dl=0
    I chose to use my DropBox because I have nothing on there anymore, I'm using GDrive.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 11
    Last Post: 10th May 2018, 08:43 PM
  2. Replies: 1
    Last Post: 3rd March 2017, 01:32 PM
  3. Saving an array?
    By Tsun in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 7th April 2012, 04:08 PM
  4. Array Saving
    By B5E in forum The Games Factory 2 - Technical Support
    Replies: 10
    Last Post: 28th July 2010, 03:51 PM
  5. Values and Saving
    By ad in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 11th April 2010, 04:37 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
  •