Editing/Appending to files

This forum is currently in read-only mode.
From the Asset Store
Source File, music and art pack for Android Negotiator
  • I'm using the INI file object to store values in a text file. I can't seem to find any Actions associated with it so that I can edit/append the ini file. I don't want to use Write as it overwrites the previous stuff.

    Also, how do you read these ini files?

  • Inis have groups and values.

    if you open an exisiting ini file with the ini object and write a new value, it will be appended.

    if you write an existing value, the previous will be overwritten.

    you may NOT use the same value twice within a group, as it doesn't make any sense.

    You may check before you write, and see if the value is there. This would in fact let you know if you were about to overwrite a value that was previously there.

    If you plan to treat ini files as strings (which is absolutely unnecessary) you could try the binary object instead.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply. I have a few more questions regarding INI objects:

    1. Let's say I don't know the name of the group but I want to access the nth group in the ini file, how do I get the group number? Or is there some other way to refer to a group?

    2. How do you sort an ini file according to the values of 1 of the items? (Assuming all groups have an item in common.)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)