Can i import my custom data? It's so silly that i can export my data but cannot import it
I just created sript that works on every data type. It is really basic script and I don't take any responsibility if it breaks something. It takes in minified json (No easy way to use multiline string in cloud code). I used Json Minifier to minify my raw json to single line string. Any part of json cannot contain ' (single quote) character.
Call it out like this, and it automatically activates. I have testEvent where i can test all of my events.
RequireOnce('ImportModule');
Script itself is here: Link
Anatoly Soyfer
Hi,
I'm new to GameSparks and have never used NOSQL before so I am a little confused about how to import custom game data. Let's say I have a custom data type called Photo which has both an image, what I assume is a downloadable, and some key:value data for each image. These photos are not associated with any player. Think of them as a general library.
Sounds like I should be uploading this via the REST API but first I have to create the schema in a cloud code function? I'm put off by the idea of creating a function/module just to initiate my data type... If someone can point me in the right direction I would be grateful because I couldn't find anything like this in the docs.
-Thanks,
Anatoly
2 people have this question