Can't use BindAction

Hello fellas, I’m working on a cpp project for one of my assignments and I’ve only had prior experience with Unity in terms of game engines so things are sorta confusing to me. Anyways what i’m trying to do is use BindAction for jumping on a pawn c++ class that i created but seems like it’s not letting me do that. I tried using PlayerInputComponent->BindAction(TEXT(“Jump”), IE_Pressed, &ACharacter::Jump); and PlayerInputComponent->BindAction((“Jump”), IE_Pressed, &ACharacter::Jump); but it gives error or the bindaction part of the code and does not let me compile it. Please look at the screenshot that i’ve attached.

You’re missing “this” keyword
BindAction("Jump", IE_Pressed, this, &ACharacter::Jump);

oh my god, i can’t believe i missed that out

TYSM!!!

1 Like