InitGame function Error

(I’m using OnStartGame instead of InitGame)

it’s telling me
member function “UBullCowCartridge::OnStartGame” may not be redeclared outside its classC/C++(392)
but it’s in header file:
public:
virtual void BeginPlay() override;
virtual void OnInput(const FString& Input) override;
void OnStartGame();

That says you have the following

class UBullCowCartridge : public UActorComponent
{
public:
    // ....
    void OnStartGame(); // declaration
};
UBullCowCartridge::OnStartGame(); // <- semicolon, declaration outside of class

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms