How can i use "UKismetArrayLibrary::Array_Get()"?

I could not figure it out how to use “UKismetArrayLibrary::Array_Get()”. I have huge struct array. I want to get item in that stuct with given index. Just like blueprint get node.

as I understand first i need to give struct array then index then normal struct.

like this ?

UPROPERTY(BlueprintReadWrite) (.h)

TArray< FtileStructCPP > tileStructArray; (.h)

FtileStructCPP tileStruct; (.h)

(355) UKismetArrayLibrary::Array_Get(tileStructArray, index, tileStruct); (cpp)

what is < error type > & item ?

Then i get errors:

Error TileCPP.cpp(355) : error C2664: ‘void UKismetArrayLibrary::Array_Get(const TArray &,int32,int32 &)’: cannot convert argument 1 from ‘TArray’ to ‘const TArray &’

Info with

Info [

Info ElementType=int32

Info ]

Error TileCPP.cpp(355) : note: Reason: cannot convert from ‘TArray’ to ‘const TArray’

Info with

Info [

Info ElementType=int32

Info ]

Error TileCPP.cpp(355) : note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

What i’m doing wrong ?

Is there any particular reason you’re using the Kistmet library? You can just do this:

YOURFILE.h

UProperty(BlueprintReadWrite)
TArray<FtileStructCPP> tileStructArray;

FtileStructCPP tileStruct;

UFUNCTION()
void RetrieveIndex(int32 index);

YOURFILE.cpp

void YOURCLASS::RetrieveIndex (int32 index) {
    if (tileStructArray.IsValidIndex(index)) {
        tileStruct = tileStructArray[index];

    }

}