TArray.RemoveAt(index) keeps giving compiler error

This is the code I am doing tests with:

TArray<int32> test; 
int32 testIndex = -1;
test.Push(123);
test.Push(456);
	
int32 random = FMath::RandRange(0, test.Num() -1);
int32 test_random = test[random]; 
testIndex = test.Find(test_random);
UE_LOG(LogTemp, Warning, TEXT("%d, %d"), test.Num(), testIndex);  //correct

test.RemoveAt[testIndex]; //errors
UE_LOG(LogTemp, Warning, TEXT("%d, %d"), test_random, test.Num());

This is the error I keep getting, anyone has any idea why?

CompilerResultsLog:Error: test.cpp(997) : error C3867: ‘TArray::RemoveAt’: non-standard syntax; use ‘&’ to create a pointer to member
CompilerResultsLog: Info with
CompilerResultsLog: Info [
CompilerResultsLog: Info ElementType=int32
CompilerResultsLog: Info ]
CompilerResultsLog:Error: test.cpp(997) : error C2109: subscript requires array or pointer type

On the phone now so can’t check it, but shouldn’t it be **() ** brackets rather than []?

yes removeAt is a function so use ()

Man, was I tired, I even wrote it correctly in the title… :slight_smile:

Thank you both!