ACharacter to AActor comparison error

Your compiler is pretty much telling you the issue. You can’t compare two pointers that are not of the same type.

I’m guessing that bit of code comes from an overlapping event handling function. If you want to check that it is in fact the player that is touching the object, there are other ways.
You could use tags for instance. But I wouldn’t compare pointers like that.