• 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!

Android aysnc_load ds_map

I am using the android export module. The game works ok. No errors. Now I am adding in AdMob using test ads. I am also using the asynchronous-social event to detect triggering.
I would like to know, would the ds_map that is automatically created by asynch_load be automatically destroyed if I used game_restart().
Appreciate any help on this subject.Thanks.
 
I tried to destroy the ds_map as follows, in an alarm[1] event.
ds_map_destroy(async_load);
game_restart();

and I got the following error,
: ERROR in
action number 1
of Alarm Event for alarm 1 for object oNewGame:
Data structure with index does not exist.
at gml_Object_oNewGame_Alarm_1

The manual says the following about async_load,
This variable is global in scope and is used to hold a DS map when used in the Asynchronous Events, and -1 at all other times. The actual contents of the DS map will depend on the type of asynchronous event that it is populated in, and the function that was used to trigger the event, so refer to the individual pages for those events.

So I am wondering if this map can be destroyed or am I doing it the wrong way. Any suggestions, please.
 

FrostyCat

Redemption Seeker
By the time an Alarm 1 event rolls around later, the map would have been gone already, so you don't need to destroy it. The Alarm 1 event counts as "all other times", so you're getting an error because you're trying to clean up map -1 (which never exists).
 
Top