Announcement

Collapse
No announcement yet.

'GetActorLabel' is not a member of 'ACharacter'

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

    'GetActorLabel' is not a member of 'ACharacter'

    Hi I'm having huge trouble packaging my game for the jam.

    The game runs nice under the editor but packaging fails.

    Apparently, I'm using GetActorLabel() and SetActorLabel() on my custom character class instances and UE doesn't want it when packaging but again, it's fine in the editor.
    Log in question is:

    Code:
    Creating makefile for UltimateElevatorLift (no existing makefile)
    Performing full C++ include scan (no include cache file)
    Parsing headers for UltimateElevatorLift
      Running UnrealHeaderTool "E:\PROJETS\Games\Unreal Projects\UltimateElevatorLift\UltimateElevatorLift.uproject" "E:\PROJETS\Games\Unreal Projects\UltimateElevatorLift\Intermediate\Build\Win64\UltimateElevatorLift\Shipping\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
    Reflection code generated for UltimateElevatorLift in 5,6715221 seconds
    Performing 12 actions (4 in parallel)
    PCH.UltimateElevatorLift.h.cpp
    PCH.UELinkerFixupsName.h.cpp
    UELinkerFixups.cpp
    ElevatorOfDoom.cpp
    LocalMPViewportClient.cpp
    UltimateElevatorLiftCharacter.cpp
    UltimateElevatorLift.cpp
    E:\PROJETS\Games\Unreal Projects\UltimateElevatorLift\Source\UltimateElevatorLift\UltimateElevatorLiftCharacter.cpp(36): error C2039: 'GetActorLabel'�: n'est pas membre de 'AUltimateElevatorLiftCharacter'
    e:\projets\games\unreal projects\ultimateelevatorlift\source\ultimateelevatorlift\UltimateElevatorLiftCharacter.h(10): note: voir la d�claration de 'AUltimateElevatorLiftCharacter'
    E:\PROJETS\Games\Unreal Projects\UltimateElevatorLift\Source\UltimateElevatorLift\UltimateElevatorLiftCharacter.cpp(36): error C2228: la partie gauche de '.Compare' doit avoir un class/struct/union
    E:\PROJETS\Games\Unreal Projects\UltimateElevatorLift\Source\UltimateElevatorLift\UltimateElevatorLiftCharacter.cpp(37): error C2039: 'SetActorLabel'�: n'est pas membre de 'AUltimateElevatorLiftCharacter'
    e:\projets\games\unreal projects\ultimateelevatorlift\source\ultimateelevatorlift\UltimateElevatorLiftCharacter.h(10): note: voir la d�claration de 'AUltimateElevatorLiftCharacter'
    E:\PROJETS\Games\Unreal Projects\UltimateElevatorLift\Source\UltimateElevatorLift\UltimateElevatorLiftCharacter.cpp(83): warning C4996: 'UWorld::LineTraceSingle': Use LineTraceSingleByChannel instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    D:\Epic Games\4.11\Engine\Source\Runtime\Engine\Classes\Engine/World.h(1114): note: voir la d�claration de 'UWorld::LineTraceSingle'
    E:\PROJETS\Games\Unreal Projects\UltimateElevatorLift\Source\UltimateElevatorLift\UltimateElevatorLiftCharacter.cpp(114): warning C4996: 'UWorld::LineTraceSingle': Use LineTraceSingleByChannel instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    D:\Epic Games\4.11\Engine\Source\Runtime\Engine\Classes\Engine/World.h(1114): note: voir la d�claration de 'UWorld::LineTraceSingle'
    E:\PROJETS\Games\Unreal Projects\UltimateElevatorLift\Source\UltimateElevatorLift\UltimateElevatorLiftCharacter.cpp(138): warning C4996: 'UWorld::LineTraceSingle': Use LineTraceSingleByChannel instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    D:\Epic Games\4.11\Engine\Source\Runtime\Engine\Classes\Engine/World.h(1114): note: voir la d�claration de 'UWorld::LineTraceSingle'
    UltimateElevatorLiftGameMode.cpp
    UltimateElevatorLiftHUD.cpp
    E:\PROJETS\Games\Unreal Projects\UltimateElevatorLift\Source\UltimateElevatorLift\UltimateElevatorLiftGameMode.cpp(85): error C2039: 'SetActorLabel'�: n'est pas membre de 'ACharacter'
    D:\Epic Games\4.11\Engine\Intermediate\Build\Win64\UE4\Inc\Engine\GameplayStatics.generated.h(45): note: voir la d�claration de 'ACharacter'
    UltimateElevatorLiftProjectile.cpp
    UltimateElevatorLift.generated.cpp
    -------- End Detailed Actions Stats -----------------------------------------------------------
    ERROR: UBT ERROR: Failed to produce item: E:\PROJETS\Games\Unreal Projects\UltimateElevatorLift\Binaries\Win64\UltimateElevatorLift-Win64-Shipping.exe
    Total build time: 36,71 seconds
    Sorry for the log being partially in french. =/
    Thanks for your time.

    #2
    Remarks

    Returns this actor's current label. Actor labels are only available in development builds.
    I have used Array Iterator Indexes.

    I wish I knew this sooner so I could have finish the game for the Jam.

    Comment


      #3
      Yeah labels are editor only I believe, (defined by the WITH_EDITOR flags).

      You can use Actor Tags though, they work in all builds.

      Comment

      Working...
      X