Hello,
I am pretty new to c++ programming and UE4.
Can someone please explain to me why this error happens:
error C2440: ‘=’: cannot convert from ‘AWaypoint *’ to ‘AWayPoint *’
void AWaypoint::OnPlayerEnter(UPrimitiveComponent * OverlapComponent, AActor * OtherActor, UPrimitiveComponent * OtherComponent, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult)
{
AAI_Bot_Character* Character = nullptr;
if (OtherActor != nullptr)
{
Character = Cast<AAI_Bot_Character>(OtherActor);
if (Character != nullptr)
{
Character->NextWayPoint = NextWayPoint;
}
}
}
This is the NextWayPoint on the character
UPROPERTY(EditAnywhere, BlueprintReadWrite)
class AWayPoint* NextWayPoint;
And in waypoint.h
UPROPERTY(EditAnywhere, BlueprintReadWrite)
AWaypoint* NextWayPoint;