Ini Object & Path Object

This forum is currently in read-only mode.
From the Asset Store
Move around the rectangular and travel as much as you can!
  • Hi!! I'am a Construct fan, the work of the team is incredible!!

    I need help with the Ini & Path Object,

    How i can do to write a Ini file in (for example) my documents using "Path",

    I use this:

    SET INI FILE -> Set Ini File to "'Path.MyDocuments'Inifile.ini" and don't work,

    i have as result a ini file stored in c:\WINDOWS\ called 'Path.MyDocuments'Inifile.ini.

    Nos Vemos! y Gracias a Todo el Equipo por Crear Construct!!

    PD: I trying to make a external CONFIGURATION windows apps, i someone want to know.

    • Sorry about my poor english- THIS IS NO MY MOTHER TOUNGUE
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You don't want to put Path.MyDocuments in quotes because it's an expression, not a string. Your code should look more like this:

    Path.MyDocuments & "inifile.ini"

    The "&" symbol will essentially stitch strings and expressions together. Hope that helps.

  • Windows Vista might not let you write to the My Documents folder like that.

    You could alternatively try storing it in the same directory as the application:

    AppPath & "myfile.ini"

  • I'm not sure that works either. To be safe you really should always save configuration files in the application settings directory:

    Path.AppData & "inifile.ini"

  • Yeah! It's working now, Thank for your & HELP &

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