Hello everyone!
I am new to Unreal 4 and UE in general, I mostly did my previous programming work in C# and in Unity more specifically but I decided to switch, and unfortunately this engine is frustrating me.
I am not much of a C++ programmer but I know the core concepts and as a tutorial for myself i decided to create my own FPS character, the problem arises in the BindAxis function. Everything is set up exactly like in the tutorials
and in the basic FPS character, yet I get an error specifically on the â->â part of the calling
void AMyCharacter::SetupPlayerInputComponent(class UInputComponent* InputComponent)
{
check(InputComponent)
Super::InputComponent->BindAxis(âMoveForwardâ, this, &AMyCharacter::MoveForward);
}
This is the intellisense error: 4 IntelliSense: no instance of overloaded function âUInputComponent::BindAxisâ matches the argument list
argument types are: (const char [12], AMyCharacter , void (AMyCharacter::)())
object type is: UInputComponent c:\Users\Desktop\Work\Project\Learning\MyProject2\Source\MyProject2\MyCharacter.cpp 33 23 MyProject2
These are the compilerâs errors:
1.Error 1 error C2664: âFInputAxisBinding &UInputComponent::BindAxis(const FName)â : cannot convert argument 3 from âvoid (__cdecl AMyCharacter::* )(void)â to âvoid (__cdecl AMyCharacter::* )(float)â C:\Users\Desktop\Work\Project\Learning\MyProject2\Source\MyProject2\MyCharacter.cpp 33 1 MyProject2
2.Error 2 error : Failed to produce item: C:\Users\Desktop\Work\Project\Learning\MyProject2\Binaries\Win64\UE4Editor-MyProject2.pdb C:\Users\Desktop\Work\Project\Learning\MyProject2\Intermediate\ProjectFiles\ERROR MyProject2
3.Error 3 error MSB3073: The command ââC:\Program Files\Epic Games\4.7\Engine\Build\BatchFiles\Build.batâ MyProject2Editor Win64 Development âC:\Users\Desktop\Work\Project\Learning\MyProject2\MyProject2.uprojectâ -rocketâ exited with code -1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 38 5 MyProject2