• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code Data structure with index does not exist, error when loading file.

FrostyCat

Redemption Seeker
The Manual's entry for ds_map_secure_save() said:
This function will save the contents of the given ds_map to a file that is linked to the device it was created on (meaning it can't be read if transferred to any other device).
 
G

GMRG

Guest
Is there any way to circumvent this? I also believe you are making the manual entry copy paste up as I cannot see it in the manual. Are you actually taking it from the manual or are you just making up? It is nowhere to be found.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
https://docs2.yoyogames.com/index.html?page=source/_build/3_scripting/4_gml_reference/data_structures/ds maps/ds_map_secure_save.html
IMPORTANT! One of the features of a secure saved file is that it is locked to the device that it was created on, so you cannot load a file saved on one device into a project running on another device.

https://docs2.yoyogames.com/index.html?page=source/_build/3_scripting/4_gml_reference/data_structures/ds maps/index.html
These functions will obfuscate the map and store it in a secure location on the target platform using a file format that means that the final file is not able to be transferred between devices:

Manual is pretty clear... ;)
 
G

GMRG

Guest
The part I quoted is the very first line of the Manual entry of ds_map_secure_save(). Nowhere to be found?
This is the entire page of the ds_map_secure_save for me. Have you tried clearing the cache in your browser?


ds_map_secure_save
This function will save the given ds_map to a secure location on the target platform.
Syntax:
ds_map_secure_save(map, filename);



Argument Description
map The id of the data structure to use
filename The name of the file to save the map to


Returns: Boolean



Description
This function will save the contents of the given ds_map to a file. The file itself can have almost any extension (for example, *.dat, *.json, *.bin, etc...) and will be encrypted and stored to a safe location on the target platform. In this way you can store sensitive information, like in app purchase details or passwords, locally in a secure way. you can then re-load the ds_map using the function ds_map_secure_load().




Example:
ds_map_secure_save(purchase_map, "p_data.dat");

The above code will save the ds_map indexed in the variable "p_data" to the given file for later retrieval.
 
G

GMRG

Guest
Not for me :confused: This is what my page says, Try clearing your browser cache to fix it. :D;)



ds_map_secure_save
This function will save the given ds_map to a secure location on the target platform.
Syntax:
ds_map_secure_save(map, filename);



Argument Description
map The id of the data structure to use
filename The name of the file to save the map to


Returns: Boolean



Description
This function will save the contents of the given ds_map to a file. The file itself can have almost any extension (for example, *.dat, *.json, *.bin, etc...) and will be encrypted and stored to a safe location on the target platform. In this way you can store sensitive information, like in app purchase details or passwords, locally in a secure way. you can then re-load the ds_map using the function ds_map_secure_load().




Example:
ds_map_secure_save(purchase_map, "p_data.dat");
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
You are looking in the (obsolete) GMS1.4 manual, not the GMS2 manual, and this is the GMS2 tech support section. I suggest you make sure you are looking at the correct version of the manual for the version you are using. That said, the information is applicable to both versions of the product, just that the old manual wasn't as clear on the details.

Believe me, I should know, I WROTE the manual (both of them).

;)
 
Last edited:
G

GMRG

Guest
You are looking in the (obsolete) GMS1.4 manual, not the GMS2 manual, and this is the GMS2 tech support section. I suggest you make sure you are looking at the correct version of the manual for the version you are using. That said, the information is applicable to both versions of the product, just that the old manual wasn't as clear on the details.

Believe me, I should know, I WROTE the manual (both of them).

;)
Oh, I thought both were the same. You should make it redirect to the new one if the information is applicable to both versions :)
 
Top