Skip to main content
Remove tag
Link
liggiorgio
  • 5.5k
  • 6
  • 27
  • 38
Fixing the formatting
Source Link
Vaillancourt
  • 16.4k
  • 17
  • 56
  • 61

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).

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).

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).

added 61 characters in body
Source Link

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).

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.

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).

added 43 characters in body
Source Link
Loading
Source Link
Loading