npruehs / ue4-rts

Real-time strategy plugin and showcase for Unreal Engine 4.
MIT License
747 stars 151 forks source link

Compiling problem #59

Closed charizardfuego52 closed 6 years ago

charizardfuego52 commented 6 years ago

Let me say this first: I love how this plugin works, it's super easy to use! But when i try to package the project (or the plugin) i always get an error. Worst is: when i tried to open the template project in 4.16.3 (Yeah, 4.16.1 can't be downloaded) It give me the same kind of error :(

This is the compile log: unning F:/Epic Games/Epic Games/UnrealEngine/UE_4.16/Engine/Binaries/DotNET/UnrealBuildTool.exe RTS Development Win64 -project="D:/RTS 4.16/RTS.uproject" -editorrecompile -progress -NoHotReloadFromIDE Performing full C++ include scan (building a new target) Creating makefile for RTS (no existing makefile) @progress push 5% Parsing headers for RTSEditor Running UnrealHeaderTool "D:\RTS 4.16\RTS.uproject" "D:\RTS 4.16\Intermediate\Build\Win64\RTSEditor\Development\RTSEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed Reflection code generated for RTSEditor in 16,6905014 seconds @progress pop Performing 13 actions (2 in parallel) [2/13] Resource ModuleVersionResource.rc.inl SharedPCH.Engine.cpp PCH.RTS.cpp Module.RTSPlugin.cpp D:\RTS 4.16\Plugins\RTSPlugin\Source\RTSPlugin\Private\RTSMinimapWidget.cpp(223): error C2660: 'FSlateDrawElement::MakeLines': la funci?n no acepta 4 argumentos D:\RTS 4.16\Plugins\RTSPlugin\Source\RTSPlugin\Private\RTSMinimapWidget.cpp(234): error C2665: 'FSlateDrawElement::MakeBox': ninguna de las 2 sobrecargas pudo convertir todos los tipos de argumento F:\Epic Games\Epic Games\UnrealEngine\UE_4.16\Engine\Source\Runtime\SlateCore\Public\Rendering\DrawElements.h(338): note: puede ser 'void FSlateDrawElement::MakeBox(FSlateWindowElementList &,uint32,const FPaintGeometry &,const FSlateBrush ,const FSlateResourceHandle &,const FSlateRect &,ESlateDrawEffect,const FLinearColor &)' F:\Epic Games\Epic Games\UnrealEngine\UE_4.16\Engine\Source\Runtime\SlateCore\Public\Rendering\DrawElements.h(329): note: o 'void FSlateDrawElement::MakeBox(FSlateWindowElementList &,uint32,const FPaintGeometry &,const FSlateBrush ,const FSlateRect &,ESlateDrawEffect,const FLinearColor &)' D:\RTS 4.16\Plugins\RTSPlugin\Source\RTSPlugin\Private\RTSMinimapWidget.cpp(234): note: al hacer coincidir la lista de argumentos '(FSlateWindowElementList, int32, FPaintGeometry, const FSlateBrush *, ESlateDrawEffect, FLinearColor)' RTSPlugin.generated.1.cpp RTSPlugin.generated.2.cpp [7/13] Resource PCLaunch.rc [8/13] Resource PCLaunch.rc RTS.cpp [10/13] Link UE4Editor-RTS.dll [11/13] Link UE4Editor-RTS.lib Creando biblioteca D:\RTS 4.16\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-RTS.lib y objeto D:\RTS 4.16\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-RTS.exp Creando biblioteca D:\RTS 4.16\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-RTS.suppressed.lib y objeto D:\RTS 4.16\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-RTS.suppressed.exp ERROR: UBT ERROR: Failed to produce item: D:\RTS 4.16\Plugins\RTSPlugin\Binaries\Win64\UE4Editor-RTSPlugin.dll Total build time: 110,27 seconds (Local executor: 0,00 seconds)

npruehs commented 6 years ago

Hey @charizardfuego52! Thanks for bringing this up, this sounds familiar from the forums.

Reverting the changes made in commit c5a62a0 might fix your problem, more specifically:

Does this help?

charizardfuego52 commented 6 years ago

I will try it! If anything goes wrong i will write!

charizardfuego52 commented 6 years ago

Nope, i tried on 4.17 and it just doesn't works anyway... Same error!

npruehs commented 6 years ago

Can you .zip your current whole project and send it to me? I've still got both 4.17 and 4.18 installed on my machine.

charizardfuego52 commented 6 years ago

Sending Rar/Zip tomorrow

charizardfuego52 commented 6 years ago

Im having problems with my internet :/ when im able i will upload through Mega /:

charizardfuego52 commented 6 years ago

Here are the files: https://mega.nz/#F!1LABHagZ!kK_kLuWg6ow16W06GR1LOg thank you!

npruehs commented 6 years ago

Hey @charizardfuego52!

I've finally found the time for wrapping my head around this, and there were several issues, actually. Luckily, I've had similar issues in another project using the plugin.

Here's what I had to do:

I've attached the updated contents of the folder Plugins\RTSPlugin\Source\RTSPlugin for convenience. You should be able to just delete your folder and replace its contents. I'm going to push the changes to GitHub soon, as well.

RTSPlugin.zip

Thanks for bringing this up :)

npruehs commented 6 years ago

The above changes have also been pushed to the dec2017 branch at https://github.com/npruehs/ue4-rts/tree/feature/dec2017

Note that using that branch, you might have to rewire any blueprints that were listening for the OnResourcesChanged event of the player controller, because that event has been moved to a new PlayerResourcesComponent.