Saving Arrays, crash issue

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.
  • Hello,

    I recently bought the android exporter because of all the neat features finally being added. :)
    Im currently porting a game from iOS to Android and I had some crashing issues. Ive managed to pinpoint the problem to the action of saving to an array file, I think.
    Im a complete noob when it comes to android and noticed android apps need things called ‘permissions’ to use certain features properly.
    I assumed saving data onto the device will need a certain permission?
    I need help with figuring out which one is appropriate.

    I tried WRITE_EXTERNAL_STORAGE but the app still crashes in the same place...
    When I remove the save to array, everything works fine.
    Im using the latest beta of MMF2 DEV 257.22

    Thanks

    UPDATE:
    I set up a test application to make sure if this was really the issue with android and it is.
    In my test app, at start of frame I set a random number in a counter then save that to the array as a value at x,y location. The app crashes.
    Is there something Im missing? This same action works smoothly in every exporter except android for some reason. (which is why Im assuming its a setting Ive got wrong, like permissions or version)
    I set the version of android to 2.2, the app crashes
    I set the version of android to 3.2, the app freezes
    I haven't tried 4.1 or 4.2 yet (I don't know how to change the android sdk directory for MMF2 android applications, but thats a different question ^^; )

    Please login to see this link.

  • Thanks! I didnt notice this expression before.
    I tried these expressions on the array object

    Code
    save array to file DataStorageDirectory$( "Android object" )

    And when that didnt work, I tried

    Code
    save array to file ExternalStorageDirectory$( "Android object" )

    But it still crashes for either expression :(
    Are there further requirements besides that? Is there something im missing?

    Also, I did another test. Saving to INI files works. Its just arrays that are giving me this problem :/

    Please login to see this link.

    Edited once, last by pdsoft (July 15, 2013 at 8:17 PM).

  • UPDATE!

    Ok, I found your post in the other android forum, DaveC. Thanks so much for the help :D

    Now I know the expression should look something like this:

    Code
    save array to file DataStorageDirectory$( "Android object" )+"array.arr"

    And its working.

    Please login to see this link.

Participate now!

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