C
CRob1974
Guest
Hi, I am trying to create a ds_list and have been trying to create a test program to see if I have got it right but it doesnt seem to work. I understand the concept but dont think I have structured the program correctly. The code is written in an invisible controller object.
Here is my code, any help would be appreciated. Thank you.
CREATE
list = ds_list_create();
listmax = 10;
STEP
if (keyboard_check_pressed(vk_space))
{
if (ds_list_size(list) < listmax)
{
ds_list_add(list,"Item");
}
if (ds_list_size(list) > listmax)
{
show_message("Max Reached")
}
}
Here is my code, any help would be appreciated. Thank you.
CREATE
list = ds_list_create();
listmax = 10;
STEP
if (keyboard_check_pressed(vk_space))
{
if (ds_list_size(list) < listmax)
{
ds_list_add(list,"Item");
}
if (ds_list_size(list) > listmax)
{
show_message("Max Reached")
}
}