Fstring ObjectName = GetOwner()->GetName();
Fstring is undefined.
From previous lessons in the course i understand you have to use: (forum doesnt allow arrows around iostream but i know it needs them)
#include iostream
using Fstring = std::string;
But this still throws up an error.
Anyone have any ideas?
This is my current code as im just trying to finish off this lesson “Accessing Object Names”.
// Fill out your copyright notice in the Description page of Project Settings.
#include “PositionReporter.h”
#include “Gameframework/Actor.h”// Sets default values for this component’s properties
UPositionReporter::UPositionReporter()
{
// Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these >features
// off to improve performance if you don’t need them.
PrimaryComponentTick.bCanEverTick = true;}
// Called when the game starts
void UPositionReporter::BeginPlay()
{
Super::BeginPlay();
Fstring ObjectName = GetOwner()->GetName();
UE_LOG(LogTemp, Warning, TEXT(“Position Report reporting for duty on chair”));}
// Called every frame
void UPositionReporter::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* >ThisTickFunction)
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);// …
}
EDIT: I’m absolutely dumb as hell, the issue was Fstring needed to be FString