//h
/**
* Drops the first N elements of the array and copies the rest to a new array. If N is larger than size of the input array, an empty array is returned.
*
* @param TargetArray Array.
* @param Size Number of elements to drop.
* @return The array without the first N elements.
*/
UFUNCTION(BlueprintCallable, CustomThunk, meta = (CompactNodeTitle = "DROP", Category = "Array Utils", ToolTip = "Drop N items from the beginning of the input array and copy the rest to a new array. If N is larger than size of the input array, an empty array is returned.", ArrayParm = "TargetArray", Keywords = "drop delete drray"))
static TArray<int32> ArrayDrop(const TArray<int32>& TargetArray, int32 Size);
static TArray<int32> GenericArrayDrop(void* TargetArray, const UArrayProperty* ArrayProp, int32 Size);
DECLARE_FUNCTION(execArrayDrop)
{
Stack.MostRecentProperty = nullptr;
Stack.StepCompiledIn<UArrayProperty>(NULL);
void* ArrayAddr = Stack.MostRecentPropertyAddress;
UArrayProperty* ArrayProperty = Cast<UArrayProperty>(Stack.MostRecentProperty);
if (!ArrayProperty)
{
Stack.bArrayContextFailed = true;
return;
}
P_GET_PROPERTY(UIntProperty, Size); // Cannot resolve symbol 'TCppType'
P_FINISH;
P_NATIVE_BEGIN;
GenericArrayDrop(ArrayAddr, ArrayProperty, Size);
P_NATIVE_END;
}
//log
10>EXEC: Error : Task failed with exit code: 2
10>NumericBPLibrary.h(516): Error C2039 : 'TCppType': is not a member of 'UIntProperty'
10>UnrealTypePrivate.h(252): Reference C2039 : see declaration of 'UIntProperty'
10>NumericBPLibrary.h(516): Error C2065 : 'TCppType': undeclared identifier
10>NumericBPLibrary.h(516): Error C2146 : syntax error: missing ';' before identifier 'Size'
10>NumericBPLibrary.h(516): Error C2065 : 'Size': undeclared identifier
10>NumericBPLibrary.h(516): Error C2039 : 'GetDefaultPropertyValue': is not a member of 'UIntProperty'
10>UnrealTypePrivate.h(252): Reference C2039 : see declaration of 'UIntProperty'
10>NumericBPLibrary.h(516): Error C3861 : 'GetDefaultPropertyValue': identifier not found
10>NumericBPLibrary.h(519): Error C2065 : 'Size': undeclared identifier
Cache statistic: hit 0 of 0 (0 %), remote 0, read 0, write 0, total 0
10>ERROR: Error : Build failed
Total time in XGE executor: 30.60 seconds
Total execution time: 33.20 seconds
10>Microsoft.MakeFile.Targets(44,5): Error MSB3073 : The command "C:\ue53\UE_5.3\Engine\Build\BatchFiles\Build.bat LUGINEditor Win64 Development -Project="D:\OneDrive\Escritorio\LUGIN\LUGIN.uproject" -WaitMutex -FromMsBuild" exited with code 6.
You should probably be using FArrayProperty / FIntProperty instead of UArrayProperty / UIntProperty now.
You might also have to drop the TArray<int32> as a return value, and use an Out parameter instead, so you can also flag it with ArrayParm and ArrayTypeDependentParams. Something like this :