My C++ Code Wouldn't Compile!

Why is it that the code won’t compile specific codes? Because my OpenDoor is already having trouble with GetWorld and I cannot compile the Grabber code because of it?! What kind of nonsense is this?

You’re most likely missing an include for UWorld for the GetWorld issue which is just needed for intellisense and won’t cause a compilation error.

For the other you most likely have an actual error in Grabber, I would need to see the error message and code to tell you what that error is though.



So these two are the ones with those errors. I never realized Grabber had one until now.

  1. Whenever you use a type you need to include the header for it, in this case for UWorld since you’re accessing members off of the type GetWorld returns (UWorld). The IWYU lecture goes over how to find includes
  2. You have extra stuff in your log ObjectName and ObjectPos do not exist and you don’t have any %s in your format string, so remove them.

Privacy & Terms