GML [SOLVED] trouble with ds_list, crash the information

K

Kasra_n

Guest
i have 2 pictures first show the code and the second shows the debug result:
upload_2019-6-25_11-34-49.png
so as you see the ds_list dont store all the 400 cells of my array i create [20, 20] array and it stores [20, 0], but why ? is storing in ds_list have a limit ? cuz i know it make a copy inside the node of the list
 
K

Kasra_n

Guest
also i tryed to change my initializing code to something like bellow:
Code:
for(var i = 0; i < global.lln; i++)
{
    ds_list_insert(global.dsm, i, 0);
}

//contain_loading_time
for(var i = 0; i < global.lln; i++)
{
    for(var j = 0; j <= global.mcs; j++)
    {
        info[j, global.mcs] = 0;
        ds_list_replace(global.dsm, i, info);
    }
}
but finally when i use:
Code:
temp = ds_list_find_value(global.dsm, n);
temp[f, g] = 10; // compile error
it says trying to index a variable that is not array :/ pretty confused, cant implementing with gml
 

Simon Gust

Member
Usually it works when you set the last cell of an array. May also be because you do not use the @ accessor when you pull the array from the list (temp).
temp[@ f, g] = 10;
 
Top