Cannot get position reporter on grabber to work

I’m stuck; my version of UE is 4.18.2

This is the code on my DefaultPawn_BP’s grabber.h file:

// Fill out your copyright notice in the Description page of Project Settings.

#include "grabber.h"
#include "buildingescape.h"
#include "GameFramework/Actor.h"

// Sets default values for this component's properties
	// 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 Ugrabber::BeginPlay()

	UE_LOG(LogTemp, Warning, TEXT("hello");


// Called every frame
void Ugrabber::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
	Super::TickComponent(DeltaTime, TickType, ThisTickFunction);

	// ...

It won’t even compile with UE_LOG(LogTemp, Warning, TEXT(“hello”); in the file; I have to remove it or I can’t even open Unreal Editor. There are errors all in my code now, like with BeginPlay. If I remove the UE_Log(LogTemp…) then it runs just fine even with the red squigglies all underneath so many new things in my code (EDIT: These have gone away upon saving/ closing/ opening Visual Studio, BeginPlay and everything is now recognized) . I have #include “CoreMinimal.h” and #include “Engine.h” in my header file.

Please help me get this game working, I’ve been at it all morning and nothing is working.

I still haven’t got position reporter to work. The code will still not compile.

Privacy & Terms