Cannot call a function from another class! No errors UE4 just closes itself

There might actually be another problem. Your GetActor() may not return a valid AEnemyActor object. You may hit something else. You should use the UE casting methods to cast the return value of GetActor() and check if EActor is NULL afterwards. If you do not, you may run into a null reference exception