append_array doesn't exist in GoDot v.3.2.3?

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

Consider this snippet:

 	var arr1 = [666] 	
    var arr2 = [1,2,3]
 	arr1.append_array(arr2)
 	print(arr1)

It doesn’t work. The compiler responds me:

Invalid call. Nonexistent function ‘append_array’ in base ‘Array’.

But the reference states its existence and its importance.

What is going on, after all? What am I doing wrong?

That’s because as far as i know no such function exists in the Array class
You will however find it in the subsidiaries of Array like for instance PoolIntArray
if your arrays have multiple data types concatenate using + or explicitly define its type and convert one type to the other before appending

var arr1 : PoolIntArray = [222]    
var arr2 = [1,2,3]
arr1.append_array(arr2)
print(arr1)

Wakatta | 2021-03-15 03:14

The method was actually added to Array in 3.2.4 betas/RCs. It’s just that the class reference update was merged too early :slight_smile:

Calinou | 2021-03-15 13:22

:bust_in_silhouette: Reply From: exuin

append_array() is for 3.2.4, not 3.2.3. 3.2.3 was released Sept 17, 2020 and the append_array() method merged on Nov 10, 2020.