I'm currently at the end of my patience with unreal:
I'm currently following a Udemy course in which they don't show the required includes so we are left to our own devices. I could go with it except every time i add an include i get the error "this declaration has no storage class or type specifier" and if I manage to get around it, (this is my current status) every time i use GetWorld()->GetPlayerController()->GetPawn() to get the player actor i get the error "pointer to incomplete class type is not allowed". The code i entered seems to be correct, but Unreal Engine still seems to crash.
For clarification purposes: GetWorld()->GetPlayerController() works; I could only get the GetPawn() after i installed Visual Assist; I'm fairly new to C++ and a complete begginer to unreal although i have dabbled in unity.
Code for the GetPawn thing:
asked Jul 10 '17 at 11:35 AM in C++ Programming
First what type of object is UOpenDoor from the looks of it it's an UObject but it probably should be an actor ie. AOpenDoor. If it's an uobject GetWorld() probably returns a nullptr which cases a crash. Always make sure to check that a pointer is valid before accessing it in c++.
answered Jul 10 '17 at 11:50 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here