/*
Example of JSON in sCallbackResult...
{
"Game": {
"0": {
"GameID": "5",
"ArmyPoints": "1000",
"HowManyOpponents": "1",
"CreatorID": "1"
}
}
}
*/
// Parse the JSON result
map = ds_map_create();
map = json_decode(sCallbackResult);
if (ds_map_exists(map,'default')) {
show_message('Bad JSON result: ' + ds_map_find_value(map,'default'));
}
// Create temp maps
var mGame; mGame = ds_map_create();
ds_map_copy(mGame, ds_map_find_value(ds_map_find_value(map,'Game'),'0'));
//show_message('Map size: ' + string(ds_map_size(ds_map_find_value(ds_map_find_value(map,'Game'),'0'))));
show_message('Map size: ' + string(ds_map_size(mGame)));
When the above code runs, the script simply hangs and never completes. If you change the comments to not use the mGame map that is supposed to be populated from a ds_map_copy, you see the message box and it shows size=4 as expected. What is wrong with ds_map_copy here?
Thanks for your help











