Download

Problem In my Player class

So when I get to binding the inputs it fires errors in VS.
"Error 1 error LNK2019: unresolved external symbol “public: void __cdecl APlrCharacter::Walk(float)” (?Walk@APlrCharacter@@QEAAXM@Z) referenced in function “public: virtual void __cdecl APlrCharacter::SetupPlayerInputComponent(class UInputComponent *)” (?SetupPlayerInputComponent@APlrCharacter@@UEAAXPEAVUInputComponent@@@Z) C:\Users\Brian\Documents\Unreal Projects\Triton\Intermediate\ProjectFiles\PlrCharacter.cpp.obj Triton
"

Header



#include "GameFramework/Character.h"
#include "PlrCharacter.generated.h"

UCLASS(config=Game)
class TRITON_API APlrCharacter : public ACharacter
{
	GENERATED_BODY()

	int32 Health;


public:
	// Sets default values for this character's properties
	APlrCharacter(const FObjectInitializer& ObjectInitializer);

//protected:
	void Walk(float Value);
	void Strafe(float Value);
	
//protected:
	// Called to bind functionality to input
	virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;	
};


CPP



#include "Triton.h"
#include "PlrCharacter.h"


// Sets default values
APlrCharacter::APlrCharacter(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
 	// Set this character to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	//PrimaryActorTick.bCanEverTick = true;

}

// Called to bind functionality to input
void APlrCharacter::SetupPlayerInputComponent(class UInputComponent* InputComponent)
{
	//Super::SetupPlayerInputComponent(InputComponent);
	check(InputComponent);
	InputComponent->BindAxis("Walk", this, &APlrCharacter::Walk);
	InputComponent->BindAxis("Strafe", this, &APlrCharacter::Strafe);
}


Does anyone see any problems?

Where is the code for your Walk() and Strafe() functions?

:stuck_out_tongue: it got added after I posted it could have swore I had it in there. Oh well just a simple over sight on my part. It works now.