What kind of error is this?

After the vague challenge in Ben’s video and alot of crashing I just followed along with him instead.

The code should at least compile still; but for some reason I get this illegal use of expression error when I try to search for a component that the class is aware of.


The code is aware of what the UTankAimingComponent is, but doesnt like when I search for it. Any idea whats going on?

1 Like

I dont know what in the name of neuroscience happened, But i actually checked ben’s video to make sure I wrote the right function name for GetComponentByClass, since i thought the name sounded a little strange. I looked in his video and he did indeed write GetComponentByClass.

But just now I discovered it wasnt get component by class, it was Actually FindComponentByClass<>()

Then I went and checked ben’s video and he actualy DID write FindComponentByClass. So my brain chemistry failed me somehow.

So yeah I was using the wrong damn method name this past hour! f***!!

Edit: It crashes when I try to fire the weapon; hoping the next videos refactor will fix this… ; I’m never doing a refactoring challenge of Ben’s architecture again!

1 Like

Privacy & Terms