GMS 2 Save room


Hello everybody !!!

Can someone tell me how to save the room name in json and load it please ? I am using GMWolf 's tutorial "Advanced saving system in game maker studio 2 " but i don't know how to add and extract this information to de saved map. Or a different way to do it using json. Thankyou !!!.


Saving information
To add the room's name to a map, you use ds_map_add(map, key, value)
Example: ds_map_add(saveMap, "room_name", room_get_name(room))
saveMap is the map ID of your map, "room_name" is the key (the label corresponding to the value)

Extracting information
Then you use json_decode to convert the json back to a map and you can use ds_map_find_value(map, key) to find the stuff in the map, using the key.
'map' is the decoded json instance and key is the 'label' you've set with ds_map_add