Announcement

Collapse
No announcement yet.

Creating a class wtihout FPostConstructInitializeProperties& PCIP?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Complier says no, looks like theres lot's wrong within Action:

    Code:
    namespace ActionEnums
    {
    	enum ActionType
    	{
    		Movement,
    		Combat,
    		Other
    	};
    }
    
    class Action
    {
    public:
    	Action()
    	{
    
    	}
    	ActionEnums::ActionType CurrentActionType;
    };

    Getting these erorrs:

    'Action' : 'class' type redefinition
    'ActionEnums::ActionType' : 'enum' type redefinition
    'CurrentActionType' : undeclared identifier
    'Action' : base class undefined

    Comment


      #17
      Originally posted by Belven View Post
      'Action' : 'class' type redefinition
      'ActionEnums::ActionType' : 'enum' type redefinition
      The header file is probably getting included more than once. You want this at the top of every .h:
      Code:
      #pragma once
      The file layout of C++ is a little tricky, and UE4 projects can make that more complicated with generated headers. You may want to experiment a bit with a simple Win32 Console Application before writing any serious code.

      Comment

      Working...
      X