Using cloud_synchronise() with binary save files?

Elevory

Member
Hello,

I'm having trouble maintaining the integrity of my save file data in the Google Cloud (Android).

My save files are encrypted and prepared using buffers. I'm sending binary files to Google with cloud_file_save()--which seems to work fine--but I'm not quite sure what to do with the resulting string from cloud_synchronise()... I tried writing the string directly to a file, but this is evidently not compatible with the buffer functions:

Illegal Buffer Index -1
at gml_Script_file_decompress (line 153) - buffer_seek(output_buffer, buffer_seek_start, 0);​

Any help would be greatly appreciated. This has been driving me crazy for the better part of a day now.

Thanks!

P.S. Why does the GameMaker manual say that the save data is mapped to async_load[? "resultString"] when it's actually mapped to async_load[? "description"] ? Is that just an error in the documentation?
 
Last edited:

zbox

Member
GMC Elder
Yeah it's an error in the documentation. You could always just base64 it if you think that the problem lies in the uploading of binary data - infact, it definitely will. You can never store binary data in GM strings as GM strings are null-terminated. So the first 0x0 byte you hit will cause the read to stop short.
 
Top