Gun Script Won't Compile

So I’ve been doing the “simple shooter” thing and have the gun script down to the letter…problem is, it fails to compile and gives me an error. Here’s what it logs (Redacting some parts for privacy purposes):

 *  Executing task in folder ShooterAssetPack: Engine\Build\BatchFiles\Build.bat ShooterAssetPackEditor Win64 Development 'C:\Users\[REDACTED]\OneDrive\Documents\Various [REDACTED] Stuff\Udemy\Asset Packs\ShooterAssetPack\ShooterAssetPack\ShooterAssetPack.uproject' -waitmutex 

Using bundled DotNet SDK
Log file: C:\Users\[REDACTED]\AppData\Local\UnrealBuildTool\Log.txt
Creating makefile for ShooterAssetPackEditor (no existing makefile)
Parsing headers for ShooterAssetPackEditor
  Running UnrealHeaderTool "C:\Users\[REDACTED]\OneDrive\Documents\Various [REDACTED] Stuff\Udemy\Asset Packs\ShooterAssetPack\ShooterAssetPack\ShooterAssetPack.uproject" "C:\Users\[REDACTED]\OneDrive\Documents\Various [REDACTED] Stuff\Udemy\Asset Packs\ShooterAssetPack\ShooterAssetPack\Intermediate\Build\Win64\ShooterAssetPackEditor\Development\ShooterAssetPackEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -abslog="C:\Users\[REDACTED]\AppData\Local\UnrealBuildTool\Log_UHT.txt" -installed
C:/Users/[REDACTED]/OneDrive/Documents/Various [REDACTED] Stuff/Udemy/Asset Packs/ShooterAssetPack/ShooterAssetPack/Source/ShooterAssetPack/Gun.h(28): Error: Member variable declaration: 'RootComponent' cannot be defined in 'Gun' as it is already defined in scope 'ObjectProperty /Script/Engine.Actor:RootComponent' (shadowing is not allowed)

 *  The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command Engine\Build\BatchFiles\Build.bat ShooterAssetPackEditor Win64 Development 'C:\Users\[REDACTED]\OneDrive\Documents\Various [REDACTED] Stuff\Udemy\Asset Packs\ShooterAssetPack\ShooterAssetPack\ShooterAssetPack.uproject' -waitmutex" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it.

I’m currently using Powershell for the formatting process but I’m not exactly sure what I’m supposed to do. Thanks in advance for any suggestions.

EDIT: Well shoot, I just figured out I was using the wrong call thing. Nevermind and sorry for wasting you guys’ time.

Hey, I’m late to this but glad you found a solution. As a small bit of advice, I would recommend not working off of cloud-storage drives like OneDrive or GDrive, as you may run into data corruption problems. Great for backup, not great for working directly off of them.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms