Суббота, 23 Ноября 2024, 23:34

Приветствую Вас Гость

[ Новые сообщения · Игроделы · Правила · Поиск ]
  • Страница 1 из 1
  • 1
Ошибки Visual Studio
ТарагонДата: Понедельник, 30 Июня 2014, 13:09 | Сообщение # 1
был не раз
Сейчас нет на сайте
Проблема думаю сложна.
Делаю урок по visual studio: http://www.youtube.com/watch?v=ZPn4N3ckP8I

В файле Pickup.h Код такой:

#pragma once

#include "GameFramework/Actor.h"
#include "Pickup.generated.h"

/**
*
*/
UCLASS()
class APickup : public AActor
{
GENERATED_UCLASS_BODY()

/** True when the pickup is able to the pickup, false if something deactivates the pickup. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Pickup)
bool bIsActive;

/** Simple collision primitive to use as the root component. */
UPROPERTY(VisibleDefaultsOnly, BluePrintReadOnly, Category = Pickup)
TSubobjectPtr<USphereComponent> BaseCollisionComponent;

/** StaticMeshComponent/ to reprecent the pickup in the level */
PROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = Pickup)
TSubobjectPtr<UstaticMeshComponent> PickupMesh;

/** Function to call when the Pickup is collected */
UFUNCTION(BluePrintNativeEvent)
void OnPickedUp();

};

Цветом отметил то, что ввел я.

У фаила Pickup.cpp код такой:

#include "TutorialCode.h"
#include "Pickup.h"

APickup::APickup(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
//The pickup is valid when it is created
bIsActive = true;

//Create the root SphereComponent to handle the picku's 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 for the static mesh
PickupMesh->SetSimulatePhysics(true);

//Attach the StaticMeshComponent to the root component
PickupMesh->attachTo(RootComponent);
}

void APickup::OnPickedUp->Implementation()

{
//There is no default behavior for a Pickup when it is picked up.

{

}
}

И выводятся определенные ошибки:

12 IntelliSense: identifier "VisibleDefaultsOnly" is undefined c:\Users\Grim\Documents\Unreal Projects\TutorialCode\Source\TutorialCode\Pickup.h 25 11 TutorialCode

7 IntelliSense: identifier "ULandscapeInfo" is undefined e:\Engine\Unreal Engine\4.2\Engine\Source\Runtime\Engine\Classes\Landscape\LandscapeGizmoActiveActor.h 132 37 TutorialCode

9 IntelliSense: identifier "UBTNode" is undefined e:\Engine\Unreal Engine\4.2\Engine\Source\Runtime\Engine\Classes\AI\BehaviorTree\BehaviorTreeTypes.h 410 42 TutorialCode

10 IntelliSense: identifier "SelectedLevelsChangedEvent" is undefined e:\Engine\Unreal Engine\4.2\Engine\Source\Runtime\Engine\Classes\Engine\World.h 1916 68 TutorialCode

17 IntelliSense: identifier "PickupMesh" is undefined c:\Users\Grim\Documents\Unreal Projects\TutorialCode\Source\TutorialCode\Pickup.cpp 20 2 TutorialCode

15 IntelliSense: identifier "Pickup" is undefined c:\Users\Grim\Documents\Unreal Projects\TutorialCode\Source\TutorialCode\Pickup.h 25 62 TutorialCode

6 IntelliSense: identifier "FOnSelectedLevelsChangedEvent" is undefined e:\Engine\Unreal Engine\4.2\Engine\Source\Runtime\Engine\Classes\Engine\World.h 1916 2 TutorialCode

5 IntelliSense: identifier "FMeshBatchElement" is undefined e:\Engine\Unreal Engine\4.2\Engine\Source\Runtime\ShaderCore\Public\VertexFactory.h 474 102 TutorialCode

8 IntelliSense: identifier "FLandscapeEditorLayerSettings" is undefined e:\Engine\Unreal Engine\4.2\Engine\Source\Runtime\Engine\Classes\Landscape\LandscapeInfo.h 188 13 TutorialCode

14 IntelliSense: identifier "Category" is undefined c:\Users\Grim\Documents\Unreal Projects\TutorialCode\Source\TutorialCode\Pickup.h 25 51 TutorialCode

13 IntelliSense: identifier "BlueprintReadOnly" is undefined c:\Users\Grim\Documents\Unreal Projects\TutorialCode\Source\TutorialCode\Pickup.h 25 32 TutorialCode

11 IntelliSense: explicit type is missing ('int' assumed) c:\Users\Grim\Documents\Unreal Projects\TutorialCode\Source\TutorialCode\Pickup.h 25 2 TutorialCode

20 IntelliSense: expected a declaration c:\Users\Grim\Documents\Unreal Projects\TutorialCode\Source\TutorialCode\Pickup.cpp 33 2 TutorialCode

21 IntelliSense: expected a declaration c:\Users\Grim\Documents\Unreal Projects\TutorialCode\Source\TutorialCode\Pickup.cpp 36 1 TutorialCode

16 IntelliSense: expected a ';' c:\Users\Grim\Documents\Unreal Projects\TutorialCode\Source\TutorialCode\Pickup.h 26 2 TutorialCode

19 IntelliSense: expected a ';' c:\Users\Grim\Documents\Unreal Projects\TutorialCode\Source\TutorialCode\Pickup.cpp 29 25 TutorialCode

18 IntelliSense: declaration is incompatible with "void APickup::OnPickedUp()" (declared at line 30 of "c:\users\grim\documents\unreal projects\tutorialcode\source\tutorialcode\Pickup.h") c:\Users\Grim\Documents\Unreal Projects\TutorialCode\Source\TutorialCode\Pickup.cpp 29 15 TutorialCode
Error

4 error MSB3073: The command ""E:\Engine\Unreal Engine\4.2\Engine\Build\BatchFiles\Build.bat" TutorialCodeEditor Win64 Development "C:\Users\Grim\Documents\Unreal Projects\TutorialCode\TutorialCode.uproject" -rocket" exited with code -1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 38 5 TutorialCode
Error

3 error code: 2 C:\Users\Grim\Documents\Unreal Projects\TutorialCode\Intermediate\ProjectFiles\Error TutorialCode
Error

2 error : In Pickup: Unrecognized type 'TSubjectPtr' C:\Users\Grim\Documents\Unreal Projects\TutorialCode\Source\TutorialCode\Pickup.h 22 1 TutorialCode

Что за ошибки не знаю. Пытался сравнить с уроком, вроде все правильно. Помогите кто может!
По идеи максимум 18 уроков. Но боюсь если эти ошибки не исправлю и будут накапливаться другие, то будет сложнее.


Сообщение отредактировал Тарагон - Понедельник, 30 Июня 2014, 13:57
  • Страница 1 из 1
  • 1
Поиск:

Все права сохранены. GcUp.ru © 2008-2024 Рейтинг