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

GameMaker Using ds_map_secure_load?

Neptune

Member
Should I create a map before loading a map like this?
Code:
var map = ds_map_create();
if file_exists(file_name)
{
    map = ds_map_secure_load(file_name);
}
Or is this how it should be done?
Code:
var map = noone;
if file_exists(file_name)
{
    map = ds_map_secure_load(file_name);
}
 
D

Danei

Guest
The latter; the function returns the index of a fresh new piping hot ds_map, you don't need to assign it to an existing one. And if you did, that would probably take place inside the function (as in, for example, ds_map_copy() ), not by altering a variable that already points to a different map's index.
 
Top