Niften
Member
Hi,
I'm writing a level editor, and I've been using json files with ds_maps/lists without any issues. Today I came across an issue I haven't encountered before - I am creating a ds_map and adding it to another map using the
A few notes:
Here is the output from the logs, showing that there is no change in the larger dialogueEditMap:
The new ds_map should be showing up under the "goto" key.
Any help would be appreciated.
I'm writing a level editor, and I've been using json files with ds_maps/lists without any issues. Today I came across an issue I haven't encountered before - I am creating a ds_map and adding it to another map using the
ds_map_add_map
function (which I have done many times throughout this project). After using this function, the map is not added and nothing changes.A few notes:
- I am aware of the new
json_stringify
functionality with structs and arrays, and will not be using it right now. - I am able to modify the key "goto" normally otherwise.
- I am using json_encode and debug mode to look at the map.
- The value of the key "goto" is -1 prior to any changes.
ds_map_add_map(dialogueEditMap, "goto", ds_map_create());
does not work either
GML:
var newGotoMap = ds_map_create();
log(json_minify(json_encode(newGotoMap)));
ds_map_add_map(dialogueEditMap, "goto", newGotoMap);
log(json_minify(json_encode(dialogueEditMap)));
Code:
[09:31:53][LOG] {}
[09:31:53][LOG] {"spr":-1,"author":"Admin","goto":-1,"statement":"Welcome! We hope you have fun here.","choices":[]}
Any help would be appreciated.
Last edited: