0
\$\begingroup\$
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

How I can __bar and __foo[| 0] as Difference, I want to __bar.bar = 6 and __foo[| 0].bar = 5 (default).

\$\endgroup\$
2
  • \$\begingroup\$ Just a guesswork coming from the internet, try __bar = __bar; before __bar.bar++;. \$\endgroup\$ Commented Jul 28, 2021 at 13:09
  • \$\begingroup\$ I tried your method and it didn't work \$\endgroup\$ Commented Jul 29, 2021 at 1:01

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.