GMLscripts.com

ds_map_clone

Clones a map simply to a new copy and returns the created map.

  1. map = ds_map_create(); // resulting map clone:
  2. map[? "Hello"] = "World"; // {
  3. map[? "Goodbye"] = "Cruel World"; // Hello: "World"
  4. // Goodbye: "Cruel World"
  5. clone = ds_map_clone(map); // }
ds_map_clone(map)
Clones a map simply to a new copy and returns the created map.
COPY
  1. /// ds_map_clone(map)
  2. //
  3. // Clones a map simply to a new copy
  4. // and returns the created map.
  5. //
  6. // map map to clone
  7. //
  8. /// GMLscripts.com/license
  9. {
  10. var map, clone;
  11. map = argument0;
  12. clone = ds_map_create();
  13. ds_map_copy(clone, map);
  14. return clone;
  15. }

Contributors: RaniSputnik

GitHub: View · Commits · Blame · Raw