saving data simplified?

0 favourites
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • Looks like Root is a number variable, but it should be a text variable! Double click it and change that in the drop-down menu.

    Also you might want to add more than just "C:\" but it depends...For example, if my project folder was on my desktop I would set Root, in preview, to "C:" & NodeWebkit.UserFolder & "Desktop\Project\"

    You might want to set a text object to Root to see exactly what it returns (or check it in the debugger) then look in that path to see if the file was created or not.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Looks like Root is a number variable, but it should be a text variable! Double click it and change that in the drop-down menu.

    Also you might want to add more than just "C:\" but it depends...For example, if my project folder was on my desktop I would set Root, in preview, to "C:" & NodeWebkit.UserFolder & "Desktop\Project\"

    You might want to set a text object to Root to see exactly what it returns (or check it in the debugger) then look in that path to see if the file was created or not.

    I just changed the root variable to text. The file is created now, but it still isn't loading properly. In my list above, point number 5 still plays the sound for key "one" <=0. However, when opening the file in notepad, it says this: "c2dictionary":true,"data":{"one":2}}

    So it kinda looks like key "one" is being saved (it probably equals 2 because I pressed L two times), but isn't being loaded.

  • bump :(

    , are you still there?

  • In event 4 you need to load the JSON from the file with something like

    Dictionary: Load from JSON string [i]NodeWebkit.ReadFile(Root & "savefile.cute")[/i]
  • That worked. this topic is completely solved now, thanks so much both of you! <3

  • Oh yeah I forgot you have to use .ReadFile ^^; Like I said I was going by memory!

  • hi, I would like to bump this to ask another question. What would happen if I were to remove the "is in preview" condition? Would the preview have a separate save file in a temp folder somewhere? or would it cause problems?

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