Announcement

Collapse
No announcement yet.

Help with UE4 C++ Tutorials

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

    Help with UE4 C++ Tutorials

    Hi Everyone!
    I am diving into UE4 C++ and am getting some error that I am not sure exactly why I am getting.
    Click image for larger version

Name:	CodeErrors.PNG
Views:	1
Size:	151.4 KB
ID:	1137300

    Here is the code that I have for the Pickup.cpp
    Code:
    #include "TutorialCode.h"
    #include "Pickup.h"
    
    
    APickup::APickup(const class FPostConstructInitializeProperties& PCIP)
    	: Super(PCIP)
    {
    	//The pickup is valid when created
    	bISActive = true
    
    		// Create the sphere componenet to handle the pickups collision
    		BaseCollisionComponent = PCIP.CreateDefaultSubobject<USphereComponent>(this, TEXT("BaseSphereComponent"));
    
    	//Set the SphereComponent as the root component
    	RootComponent = BaseCollisionComponent;
    
    	//Create the static mesh component
    	PickupMesh = PCIP.CreateDefaultSubobject<UStaticMeshComponent>(this, TEXT("PickupMesh"));
    
    	//Turn Physics On
    
    	PickupMesh->SetSimulatePhysics(true);
    
    	//Attach the static mesh to the root component
    
    	PickupMesh->AttachTo(RootComponent);
    
    
    
    }
    
    
    void APickup::OnPickedUp_Implementation()
    {
    	//There is no Default Behavior
    }

    I have not touched the other files listed in the errors :/
    -------------------------------------------------------------------------------------------------------------------------
    Mitchell 'Panda' Rolland
    FreekVision
    Games. The Way We See Them.
    Team Lead / Game Designer
    -------------------------------------------------------------------------------------------------------------------------

    #2
    The line bISActive = true needs to have a ; at the end. You can add it and recompile. It looks like someone uploaded the wrong versions.

    Comment


      #3
      Fixed the ';' thank you for that. Do you have any idea about how I would go about fixing it? I am not using the github fork, I am using the Third Person Template through the engine launcher (4.3.1).
      -------------------------------------------------------------------------------------------------------------------------
      Mitchell 'Panda' Rolland
      FreekVision
      Games. The Way We See Them.
      Team Lead / Game Designer
      -------------------------------------------------------------------------------------------------------------------------

      Comment


        #4
        Originally posted by FV Panda View Post
        Fixed the ';' thank you for that. Do you have any idea about how I would go about fixing it? I am not using the github fork, I am using the Third Person Template through the engine launcher (4.3.1).
        If you can recreate the problem, you can file a bug report over at https://answers.unrealengine.com/ See this post for details: https://answers.unrealengine.com/que...ort-a-bug.html

        Comment


          #5
          Do you have Visual Studio installed? If so, you can just edit that file, then open the editor and go to the C++ tab and hit recompile game code. You don't have to manually compile the entire engine for that I don't think.

          Comment


            #6
            Originally posted by jCoder View Post
            If you can recreate the problem, you can file a bug report over at https://answers.unrealengine.com/ See this post for details: https://answers.unrealengine.com/que...ort-a-bug.html
            I did just that, it looks like it was completely my fault lol . Syntax and such. Everything has been smooth sailing since.
            -------------------------------------------------------------------------------------------------------------------------
            Mitchell 'Panda' Rolland
            FreekVision
            Games. The Way We See Them.
            Team Lead / Game Designer
            -------------------------------------------------------------------------------------------------------------------------

            Comment

            Working...
            X