Conversion from 'FLinearColor' to 'FLinearColor &' - error

Here is my code:

if (bBombIsTriggred && BombInstance) {
	FLinearColor CurrentBombColor;
	BombInstance->GetVectorParameterValue(FName("BombColor"), CurrentBombColor);

	BombInstance->GetVectorParameterValue(FName("BombColor"), FMath::CInterpTo(CurrentBombColor, FLinearColor::Red, DeltaTime, 3.f ));
}

and here is error message:

Cookbook\Private\MotionBomb.cpp(58) : error C4239: nonstandard extension used: ‘argument’: conversion from ‘FLinearColor’ to 'FLinearColor &'

also my headers:

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Components/SphereComponent.h"
#include "Components/StaticMeshComponent.h"
#include "Runtime/CoreUObject/Public/UObject/ConstructorHelpers.h"
#include "Runtime/Engine/Classes/Kismet/GameplayStatics.h"
#include "Runtime/Engine/Classes/GameFramework/Character.h"
#include "Runtime/Engine/Classes/Particles/ParticleSystemComponent.h"
#include "ParticleHelper.h"
#include "Particles/ParticleSystem.h"
#include "Particles/ParticleSystemComponent.h"
#include "MotionBomb.generated.h"

Can anyone help me? Sounds easy but , what is problem thou?

Cheers

Well I fix the issue with a different approach …
in .h file

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

	FLinearColor CurrentBombColor; /// <--------- here 
	UMaterialInstanceDynamic* BombInstance;
	UParticleSystem* ExposionParticles;
	bool bBombIsTriggred;

in .cpp file

if (bBombIsTriggred && BombInstance) {
	CurrentBombColor = FLinearColor::Black; // <--- here

	if (BombInstance) BombInstance->GetVectorParameterValue(FName("BombColor"), CurrentBombColor);

	if (BombInstance) BombInstance->SetVectorParameterValue(FName("BombColor"), FMath::CInterpTo(CurrentBombColor, FLinearColor::Red, DeltaTime, 3.f ));
}

Please if you have any better idea, leave some messages.

The first code snippet does two ‘GetVectorParameterValue’, which returns the FLinearColour by reference. You will have needed something like this:

FLinearColor CurrentBombColor;
						MatInst->GetVectorParameterValue(FName("BombColor"), CurrentBombColor);
						FLinearColor Col = FMath::CInterpTo(CurrentBombColor, FLinearColor::Red, DeltaTime, 3.f);
						MatInst->GetVectorParameterValue(FName("BombColor"), Col);

Your second code snippet does a Get and then a Set, which I assume is what you wanted? The set works as it is not returning the value by reference and so does not need a seperate variable for the function call.

Thanks… : ) ,