UFUNCTION() causing syntax errors?

#FORCEINLINE

UFUNCTION can’t be forceinline :slight_smile:

#Other issue

looking into it

have you tried

TArray< TEnumAsByte<EMyEnum::Type> > AvailableTeams;

#Update

This works just fine for me!

/** EnumAsByte ArrayTest */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=SolusDefaultKeyBindings)
TArray< TEnumAsByte<ESolusKeyModifiers::Type> > EnumAsByteArrayTest;

#Solution

  • add the spaces

should work if the other version compiles already!

Rama

writing something like that

UPROPERTY()
TArray<TEnumAsByte<EMyEnum::Type>> AvailableTeams;

resulting

Missing ‘>’ in TEnumAsByte

error. If I remove the UPROPERTY() it works.

Also

UFUNCTION()
	FORCEINLINE TEnumAsByte<EMyEnum::Type> GetTeam() const
	{
		return Team;
	}

resulting in

Unrecognized type ‘FORCEINLINE’

Since I am still learning C++/UE4 the question:

  • Is that a bug in the UHT or am I doing it wrong?
  • Should I decorate every function I write with the UFUNCTION() macro ?

Thank you that really worked… SPACES … OMG :slight_smile: