Controle storage file location on windows

I made a first build for windows and placed it in a folder on Sharepoint so others can get to it.
I using storage for save load. But this is only used for my instance of the game
Can I controle where the storage is placed so others can load the same file, or can I save the storage to a json file so I can load that?

In that case, you should be using the Filesystem saving method.

1 Like

Is there a Gdevelop cheat code to push everything in storage into a file, and retrieve from fil to push into storage?

I have a hard time understanding how to save stuff… I saw a youtube example from Helper Wesley yesterday about file saving, but I still have a hard time converting it something usefull in my game…

At the moment I want to save 4 things… I got it to work with storage.
Objects in draggable have an ID variable. I use this to keep track of a Toggle variable.
I then save the x,y position, the Toggle variable and ID for each object.

I have not been able to do the same with the filesystem. (got one object name or one object X position but not all)

Save all this data in a structure scene variable, then export the variable to a file using the Filesystem action.
image

Build a path to the file using the Expressions blue button on the side.

Then use the load action for the other way around:
image

I have tried making a scenevariable with structure like this:

I ended up trying to set the variable as arrays or else I only got one single number in the savefile.

I then tried using the variable in the code like this:

But I still havent figured it out as the file only have zero’s for each instance

You cannot dynamically build variable names that way. What you’re saying is “Append Variable + Draggable.Variable(Toggle)” to another variable.

Variable names are references, not strings, and “+ Draggable.Variable(Toggle)” is not a valid variable name.

You cannot use expressions or equations in the name of a variable, nor can you use them to dynamically reference the name of a parent variable.

I am not sure what to do different. I tried following the input options in the Append Event.
where I append the variable named Draggable.Variable(Toggle). -The variable works fine when I use it for storage.

I am completely lost in this issue and I have got anything to work so I am not thinking arrays are the right way to things it is just I have tried so many things to see if I get it to work.

Do you have a god idea on how I save to external file as I have not been able to use the tutorials, descriptions on the wiki etc. too work in my game

Append means add, so those “+” were really unnecessary anyway, so remove them in all lines and see if it works any better.

the + was there from the start when I created the event and it gives me the same result -only zeroes in the file.

You encouraged me to use structured scene variables. Am I using it the right way to do what I am trying to?

That’s very strange, I just tried now, and I don’t see any +.
image

Aside from that, I suggest you follow the advice written above by @Silver-Streak as I’ve yet to use the array features. :grimacing: