I Get a C2228 Error. Schweregrad Code Beschreibung Projekt Datei Zeile Unterdrückungszustand
Fehler C2228 Links von “.Broadcast” müssen sich in einer Klasse/Struktur/Union befinden PluginCreator L:\UE4 Projekte\PluginCreator\Plugins\WhatsNewFromSVN\Source\WhatsNewFromSVN\Private\WhatsNewFromSVNBPLibrary.cpp 15
in .h
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Kismet/BlueprintFunctionLibrary.h"
//#include "Engine.h"
#include "WhatsNewFromSVNBPLibrary.generated.h"
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FTestDelegate);
USTRUCT(BlueprintType)
struct FSQLRowColumns
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<FString> Column;
FSQLRowColumns()
{
}
};
UCLASS()
class UWhatsNewFromSVNBPLibrary : public UBlueprintFunctionLibrary
{
GENERATED_UCLASS_BODY()
public:
UPROPERTY(BlueprintAssignable, Category = "Test")
FTestDelegate OnTestDelegate;
//Events
UFUNCTION(BlueprintImplementableEvent, Category = "SQLite", meta = (ToolTip = "SQLite Result")) //BlueprintImplementableEvent
void ResultEvent(const TArray<FSQLRowColumns>& Results);
//Callable
UFUNCTION(BlueprintCallable, Category = "SQLite", meta = (ToolTip = "For Result, u need ResultEvent"))
static bool SelectAndResult(FString Param);
};
in .cpp
#include "WhatsNewFromSVNBPLibrary.h"
#include "WhatsNewFromSVN.h"
#include "sqlite3.h"
UWhatsNewFromSVNBPLibrary::UWhatsNewFromSVNBPLibrary(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}
bool UWhatsNewFromSVNBPLibrary::SelectAndResult(FString Param)
{
if (OnTestDelegate.IsBound())
{
OnTestDelegate.Broadcast();
}
return true;
}