Illegal Indirection?

Hi All. Why am I getting this error after creating the LaunchSpeed parameter on compile?

My code:

void UTankAimingComponent::AimTurretAt(FVector AimLocation, float LaunchSpeed)
{
auto BarrelLocation = Barrel->GetSocketLocation(“BarrelEnd”);

FString TankName = GetOwner()->GetName();
UE_LOG(LogTemp, Warning, TEXT("Launching at: %s"), *LaunchSpeed);

I’ve also tried with

UE_LOG(LogTemp, Warning, TEXT(“Launching at: %f”), *LaunchSpeed);

using %f rather than %s as it’s a float not a string. but same error.

when you use %f you dont need the * pointer, just LaunchSpeed should work

it should look like this

UE_LOG(LogTemp, Warning, TEXT("Launch Speed: %f"), LaunchSpeed);

Privacy & Terms