How do I save global variables and other object variables and use them on Android?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I am so frustrated as there is no documentation on saving and loading when producing android apps/games, If i google the issue there are forum posts about it but most are way out dated and not clear enough on how to do it. Currently I have it made so i can save and load on my PC for testing and it works properly for that but when i export and test on android there is no save or load ability. What am i doing wrong here and why is there no documentation on how to solve this issue?


    Here is the code that runs on the first main menu of game to set starting variables (this works on pc)
    Please login to see this attachment.

    Here is the load function for the main game. (this also works on pc)
    Please login to see this attachment.

    I have read in other posts about people using ExternalStorageDirectory$( "Android object" ) + "/" + "FOLDER" as a way to save but no clear instructions or steps on how to implement it. Does anyone know how to do it? If so please leave step by step guide if possible. thanks :)

  • The ini file works the same on Android as on Windows.

    Just make sure all the settings are correctly ticked:

    For example:

    Under runtime options:

    • "Don't include at build time" is not ticked.
    • "Create at start" must be ticked.

    Under settings I have:

    • UTF8 ticked
    • Create INI file in Application Data folder ticked
    • [Windows] Read changes from disk ticked
    • [Windows] write changes to disk is greyed out

    Deprecated options:

    • Not ticked

    Start of frame I have only:

    * Start of Frame
    MainControl : Set current file to "NameofFile"

    where MainControl is the name of my ini file (not the save file, the name I gave the ini file in the editor)

    You can specify a path, but you don't need to. This feature is automated, Fusion automatically saves the ini data where it should.

    Casual games: Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!