x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Packaged Project Throws an Error

Hi,

I am just getting into c++ and unreal engine so I may be doing something wrong.

Whenever I try to package the project and launch the packaged version it throws an error. I am almost definitely certain that it is related to c++ because if I do the same with blueprints it launches without any problem. The project can be played inside the editor and no error is thrown. The code is only a single function for scrolling up

h.

 // Fill out your copyright notice in the Description page of Project Settings.
 
 #pragma once
 
 #include "Kismet/BlueprintFunctionLibrary.h"
 #include "PlayerMovementLib.generated.h"
 
 /**
  * 
  */
 UCLASS()
 class THECOLONY_API UPlayerMovementLib : public UBlueprintFunctionLibrary
 {
     GENERATED_BODY()
 public:    
     //Increase the height value
     UFUNCTION(BlueprintCallable, Category = "TopDownCameraControl")
         static int32 IncreaseHeight(int32 CurrentHeight);
 }

.cpp

 // Fill out your copyright notice in the Description page of Project Settings.
 
 #include "TheColony.h"
 #include "PlayerMovementLib.h"
 
 int32 UPlayerMovementLib::IncreaseHeight(int32 CurrentHeight)
 {
     int32 ClampedHeight = CurrentHeight;
     ClampedHeight++;
     //Set higher Boundary
     if (CurrentHeight >= 13)
     {
         ClampedHeight = 13;
     }
     return ClampedHeight;
 }

The blueprint alt text

The error alt text

The project compile fine in visual studio and packages fine from the UEEditor. I can successfully launch the game from visual studio without any error in the following build configurations: DebugGame and Development

Product Version: UE 4.7
Tags:
bp.png (229.3 kB)
error.png (75.6 kB)
more ▼

asked Jun 01 '15 at 01:51 PM in C++ Programming

avatar image

gogata258
115 35 29 34

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Might be a long shot, but have you set all your default values in the project settings? E.g. default map, gamemode, controller etc.?

I've seen some cases where the Editor/VS runs fine but packaged projects crash when these weren't set.

more ▼

answered Jun 02 '15 at 08:21 AM

avatar image

staticvoidlol
2.6k 95 41 111

avatar image gogata258 Jun 02 '15 at 03:56 PM

I thought I have set everything, now that you told me there is a drop down menu with one single option Global Default Server Game Mode that had been left blank, after I have set it and rebuilt it it worked. Thank you very much, make your comment as an answer so as to mark the question as it solved

avatar image staticvoidlol Jun 02 '15 at 06:00 PM

Glad you got it working - I remember that exact setting was the cause for my crash as well :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question