Resizing array of a resource overwrite other resources Arrays sizes

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By IHate

I just found what I think it’s a bug and I would like someone to corroborate this.

I have a custom resource with a variable:

export (Array) var test0 = [null]
export (Array) var test1
var test2 = [null]
export (String) var name = ""

Then I have a node with the following function:

func set_pages():
    var page1 =
    page1.test0.resize(13) = str("Chest_Inventory_Tab",inv_pages.size())

    var page2 =
    page2.test0.resize(4) = str("Chest_Inventory_Tab",inv_pages.size())

This function generates an array with 2 resources I would expect the first Resource in inv_pages to have an array with a size of 13 and the second resource inside inv_pages to have an array with size 4.

The 2 new resources have their variable name properly set but the array variable test0 has a size of 4 on every resource.

Using test1, which doesn’t have a preset value, doesn’t have this problem and the same goes for test2 which has a value but it’s not an export variable.