ChaosVehicles enabled and Including “ChaosWheeledVehicleMovementComponent.h” in any header file, that is in use
a bunch of UStructs and/or variables within them
I was adding some new structs in C++, to be used as data structures. Everything worked fine, until I get this, completely unrelated to what I am doing:
…
[2/3] Compile [x64] Module.Project.2_of_2.cpp
C:\Program Files\Epic Games\UE_5.2\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\Evolution\IterationSettings.h(26): error C4003: not enough arguments for function-like macro invocation ‘max’
C:\Program Files\Epic Games\UE_5.2\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\Evolution\IterationSettings.h(26): error C2589: ‘(’: illegal token on right side of ‘::’
C:\Program Files\Epic Games\UE_5.2\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\Evolution\IterationSettings.h(26): error C2062: type ‘unknown-type’ unexpected
C:\Program Files\Epic Games\UE_5.2\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\Evolution\IterationSettings.h(26): error C2059: syntax error: ‘)’
…
[3/3] Compile [x64] Module.Project.1_of_2.cpp
I can get rid of these errors either by completely disabling ChaosVehicles, or by removing some UStructs. So basically this limits me to a certain amount of UStructs. Having variables inside those structs also limit this amount.
Here is an example structure of what im using:
Is there something wrong with my struct, is this a known problem with Chaos, or something else?
I can expand upon this, if I didn’t give enough information.
Hi, thanks for the quick reply.
I’ve tried all of these, but no luck
I was originally using GENERATED_BODY(). No idea what the difference is, but neither work.
Is there something else I need to do when disabling unity build. I tried recompiling in the editor after adding that to my target.cs, and also re-generating Visual Studio files after that didn’t work.
I doubt they do, mine are weather themed. Also, I can comment out one struct & keep the other uncommented, and it works. It also works if swap those around. However if I try to use them both at the same time, it doesn’t work.
Currently I’m commenting out some variables inside those structs, and if I were to uncomment those, the errors happen again.
I should also mention it doesn’t matter where the structs are located. I tried adding them to different files with no luck.
Hmm sorry I don’t have any other idea. It really looks like something for non-unity build, but if you say that it doesn’t help, it’s very hard to say. Maybe someone more experienced can help.
Definitely there is no such thing as UStructs limit.
Perhaps you shouldn’t be including the header files in your header.
Include them in your cpp and forward declare any needed variables, otherwise you can have cyclic inclusions and other bad side effects.
Also the quotation marks in your code were strange (UIMin = “0”, UIMax = “1”)
sort of curly like not properly formatted double quotations (perhaps it’s a forum thing but haven’t noticed it anywhere else)
this is what it looks like in my code (UIMin = "0", UIMax = "1")
Could it be converted quotes that are throwing off the compiler?