S
stephen2017
Guest
Hi all,
Wondering why the below code isn't working. If I do a manual add to the ds_list in one it works but for some reason not in a for loop as the reference comes back undefined. Can someone please give me some guidance.
Basically I am trying to add numbers from 1 to whatever global.questions is set at then shuffle the list so I can have a random list of numbers.
global.j = ds_list_create();
for (i = 1; i=global.questions; i++){
ds_list_add(global.j,i);
}
ds_list_shuffle(global.j);
Wondering why the below code isn't working. If I do a manual add to the ds_list in one it works but for some reason not in a for loop as the reference comes back undefined. Can someone please give me some guidance.
Basically I am trying to add numbers from 1 to whatever global.questions is set at then shuffle the list so I can have a random list of numbers.
global.j = ds_list_create();
for (i = 1; i=global.questions; i++){
ds_list_add(global.j,i);
}
ds_list_shuffle(global.j);