![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
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
Calinou | 2021-03-15 13:22