tomlooman / EpicSurvivalGame

Third-person Survival Game for Unreal Engine (Sample Project)
https://www.tomlooman.com/unreal-engine-cpp-survival-sample-game/
MIT License
3.25k stars 1.18k forks source link

Building html5 - 4 error in visual studio ( UE4 4.24 ) #86

Closed zlatnaspirala closed 3 years ago

zlatnaspirala commented 3 years ago

I am looking for fix without rebuild engine or change emsdk version... I already tested builded engine on other projects.

I am not skilled c++ ....

I have 4 critical error :

ERROR
Severity    Code    Description Project Path    File    Line    Suppression State
Error (active)  E0070   incomplete type is not allowed  \SurvivalGame\STypes.h  87  

CODE LINE 
PointDamageEvent.DamageTypeClass = DamageTypeClass ? DamageTypeClass : UDamageType::StaticClass();
ERROR
Severity    Code    Description Project Path    File    Line    Suppression State
Error       no viable conversion from 'FLinearColor' to 'FVector'   SurvivalGame    \Source\SurvivalGame\Private\World\STimeOfDayManager.cpp    136 

CODE LINE 
/* Update sun brightness to transition between day and night
            (Note: We cannot disable the sunlight because BP_SkySphere depends on an enabled light to update the skydome) */
        const float LerpSpeed = 0.1f * GetWorldSettings()->GetEffectiveTimeDilation();
Severity    Code    Description Project Path    File    Line    Suppression State
Error       unknown type name 'UParticleSystemComponent'    SurvivalGame    EpicSurvivalGameSeries-4.24\SurvivalGame\Source\SurvivalGame\Public\Items   EpicSurvivalGameSeries-4.24\SurvivalGame\Source\SurvivalGame\Public\Items\SWeapon.h 207 

also FVector LightColor

ERROR 
Severity    Code    Description Project Path    File    Line    Suppression State
Error       no viable conversion from 'FLinearColor' to 'FVector'   SurvivalGame SurvivalGame\Source\SurvivalGame\Private\World \SurvivalGame\Source\SurvivalGame\Private\World\STimeOfDayManager.cpp   136 

    FVector LightColor = SkyLightActor->GetLightComponent()->GetLightColor();
    if (SkylightColorCurve)
    {
        LightColor = SkylightColorCurve->GetVectorValue(Alpha);
    }
    SkyLightActor->GetLightComponent()->SetLightColor(LightColor);

I am not sure is it good to use auto fixer (for audio error): Untitled

Any suggestion .

caiiiycuk commented 8 months ago

Hi, @zlatnaspirala how you solved this?

zlatnaspirala commented 8 months ago

I cant remeber at the moment...

Whole solution are commited at this repo : https://github.com/RocketCraftingServer/rocket-craft/tree/master/versions/4.24-Survival/EpicSurvivalGameSeries-4.24

I make some small edit (c++ code) and i success at the end.

You can compare error by error line by line.

Be carefull with autofix Not always done good job!