function foo(_bar) constructor
{
bar = _bar;
}
__foo = ds_list_create();
ds_list_add(__foo, new foo(5));
__bar = __foo[| 0];
__bar.bar++;
show_debug_message(string(__foo[| 0].bar));
show_debug_message(string(__bar.bar));
function foo(_bar) constructor
{
bar = _bar;
}
__foo = ds_list_create();
ds_list_add(__foo, new foo(5));
__bar = __foo[| 0];
__bar.bar++;
show_debug_message(string(__foo[| 0].bar));
show_debug_message(string(__bar.bar));
And I have in Output:
6
6
6
6
How I can __bar and __foo[| 0] as Difference, I want to __bar.bar = 6 and __foo[| 0].bar = 5 (default).