DS List on MAC

This code works on PC but not on Mac. Have any ideas?

var i

// deselect all of the assets that are in the list
for (i = 0; i < ds_list_size(global.group_selected); i+=1)
{

show_message("deselected1") <------------ this message will show when I test it

with ds_list_find_value(global.group_selected,i)
{
selected = false
show_message("deselected2") <------------ this message will NOT show when I test it
}
}

Does anyone see why the second message won't show?
 

TheouAegis

Member
No active instances in the room probably.

var inst = ds_list_find_value(global.group_selected,i)
show_message(instance_exists(inst));
{
selected = false
}
}

If it ever shows 0, that's your problem.
 

TheouAegis

Member
Did you run this code yet?
Code:
var i;
for (i=0; i<ds_list_size(global.group_selected); i+=1;)
{
    var inst = ds_list_find_value(global.group_selected,i);
    show_message(string(inst) + " : " + string(instance_exists(inst));
    with inst
    {
        selected = false;
    }
}
Run that code exactly as I typed it out. You should get messages like
100102 : 1
100103: 1
100105: 1

If you see a 0 after the colon anywhere, or if the number before the colon is less than 100001, your issue is with the values in the list. You need to figure out what exactly is messing up on the Mac that is working fine on Windows.
 
H

Homunculus

Guest
Thanks!
The message reads this "0 : 0" when I used your code.
0 is not an instance id. Somehow, your group_selected list holds values that are not instances, and therefore the with code is never run for those cases.
 
Top