User Tag List

Results 1 to 10 of 10

Thread: read/write an ini

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    arthurh's Avatar
    Join Date
    Sep 2010
    Posts
    951
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question read/write an ini

    Hi,

    i would read/write an ini file in my android game.
    So i do this :
    start of frame
    > set current file of ini1 to "tes1.ini"
    > set current file of ini2 to "tes2.ini"
    > set counter1 ton groupitemValue ("ini1","my group","my item")
    > set counter2 ton groupitemValue ("ini2","my group","my item")

    Create ini file in data folder is on for each ini and the two ini files are present on the date element folder in binary data.

    the value of item are 1 and 2... but i have 0 on the two counters in mmf end nothing appear in the android tablet.

    Somebody can help me ?
    thanks

    EDIT : if i made the same in IOS, it works. If i put a pathname like apppath$ + "name of the ini" and choose windows application, it work. So the ini files are good

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    arthurh's Avatar
    Join Date
    Sep 2010
    Posts
    951
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is an example that should work but don't work in android...
    Attached files Attached files

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    arthurh's Avatar
    Join Date
    Sep 2010
    Posts
    951
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here is the 2 ini files. I need help please...
    put the 2 ini in the same folder than the mfa.
    Thanks for your help.
    Attached files Attached files

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    arthurh's Avatar
    Join Date
    Sep 2010
    Posts
    951
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HI Zonacas, thanks to your reply. I don't understand what you say... sorry. Normally, you don't put the path of an ini in IOS or Android. It is a bug of the ini objet in Android or what ?

  5. #5
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,801
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    Sorry to bump here but is working as expected in your example: Ini 2 is asking for value 1 that does not exist or i miss something here, but if you change to value2 it works


    Start of Frame
    (Ini) : Set current file to "test1.ini"
    1
    (Ini 2) : Set current file to "test2.ini"
    Always
    (Counter) : Set Counter to GroupItemValue( " (Ini)", "value1", "a")
    2
    (Counter 2) : Set Counter to GroupItemValue( " (Ini 2)", "value1",
    "a")

    since test2 have

    [value2]
    a=2
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    arthurh's Avatar
    Join Date
    Sep 2010
    Posts
    951
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi FVivolo,
    Thanks for your help !
    Yes a little mistake on the second value. But the first value should work too... And even i modify my test2.ini with [value2], i have 0 and 0 on my two counters...
    It work for you ?
    did you make anything with the mfa ?

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    arthurh's Avatar
    Join Date
    Sep 2010
    Posts
    951
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    GRRRR ! i build the apk and i have a blank screen ! no counters !...

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF 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)

    Join Date
    Apr 2007
    Location
    Australia
    Posts
    1,152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In your binary data information, you need to take the full path and use that to load the ini via events.

    For example, in binary data it reads "C:/Users/tes1.ini"

    You can't just load "tes1.ini" in your event, you need to load "C:/Users/tes1.ini"

    It's confusing because of the path, but think of the "C:/Users/" section as part of the actual full filename.

  9. #9
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,801
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by arthurh View Post
    Hi FVivolo,
    Thanks for your help !
    Yes a little mistake on the second value. But the first value should work too... And even i modify my test2.ini with [value2], i have 0 and 0 on my two counters...
    It work for you ?
    did you make anything with the mfa ?
    yes it is working for me, just fixing the value2 and setting the files to a new directory, try to copy your testxxx,ini files to the same dir , and i forgot to mention don┤t forget tge permissions, write_external_storage, and read and write owner data.
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    arthurh's Avatar
    Join Date
    Sep 2010
    Posts
    951
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanfs FVivolo and RhyD for your great help ! it work on my android tablet !

Similar Threads

  1. Safest and most universal way to write/read registry key value ?
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 21st November 2013, 11:06 PM
  2. Read-Only Edit Box isn't really READ-ONLY
    By ProdigyX in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 6th December 2011, 02:48 AM
  3. How to read/write to an HTM file from an applet
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 18th November 2009, 11:41 PM
  4. Write and read 2 values at a time from array.
    By Popcorn in forum File Archive
    Replies: 0
    Last Post: 1st April 2008, 01:09 AM

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
  •