Can't find Class in file ...

Discussions about Coding and Scripting
Post Reply
User avatar
Barbie
Godlike
Posts: 2807
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Can't find Class in file ...

Post by Barbie »

In order to check why structs cannot be saved (I'll ask that in a separate post) I created a simple mutator and added it to a map. In UnrealEd the map runs fine but when started in UnrealTournament.exe, I'll get the Critical Error "Can't find Class in file 'Class TestStructSave.TestStructSave'". The file TestStructSave.u does exist in the SYSTEM directory of UT. Why can't this map run in UnrealTournament.exe?
UnrealTournament.log
Log: Log file open, 03/07/21 12:26:49
Init: Name subsystem initialized
Init: Detected: Microsoft Windows NT 6.2 (Build: 9200)
Init: Version: 436
Init: Compiled: Oct 24 2000 23:40:18
Init: Command line: "H:\Games\UT\dev\TestStructSave\Maps\TestStructSave.unr"
Init: Base directory: D:\Programme\UT\System\
Init: Character set: Unicode
Log: Bound to Engine.dll
Log: Bound to Core.dll
Log: Bound to Window.dll
Init: Object subsystem initialized
Init: Computer: MSDPC011
Init: User: Matthias
Init: Memory total: Phys=2097151K Pagef=4194303K Virt=2097024K
Init: Working set: 32000 / 159000
Init: CPU Speed=3392.143236 MHz
Init: CPU Page size=4096, Processors=4
Init: CPU Detected: PentiumPro-class processor (GenuineIntel)
Init: CPU Features: CMov FPU RDTSC PAE MMX KNI
Init: Unreal engine initialized
Log: Bound to WinDrv.dll
Init: Mouse info: 0 0 0
Init: Initializing DirectDraw
Log: DirectDraw drivers:
Log: display (Primärer Anzeigetreiber)
Init: DirectDraw initialized successfully
Init: DirectInput initialized successfully.
Init: Client initialized
Log: Bound to Render.dll
Init: Lighting subsystem initialized
Init: Rendering initialized
Log: LoadMap: Entry
Log: Bound to Fire.dll
Log: Bound to IpDrv.dll
Log: Game class is 'UTIntro'
Log: Level is Level Entry.MyLevel
Log: Bringing Level Entry.MyLevel up for play (0)...
ScriptLog: InitGame:
ScriptLog: Base Mutator is Entry.Mutator0
Log: Browse: H:\Games\UT\dev\TestStructSave\Maps\TestStructSave.unr?Name=Barbie?Class=BotPack.TFemale1?team=0?skin=FCommandoSkins_Negaverse_Titus.ttus?Face=FCommandoSkins_Negaverse_Titus.titus?Voice=BotPack.VoiceFemaleTwo?OverrideClass=
Log: LoadMap: H:\Games\UT\dev\TestStructSave\Maps\TestStructSave.unr?Name=Barbie?Class=BotPack.TFemale1?team=0?skin=FCommandoSkins_Negaverse_Titus.ttus?Face=FCommandoSkins_Negaverse_Titus.titus?Voice=BotPack.VoiceFemaleTwo?OverrideClass=
Log: Failed import: Class Class TestStructSave.TestStructSave (file H:\Games\UT\dev\TestStructSave\Maps\TestStructSave.unr)
Warning: Failed to load 'H:\Games\UT\dev\TestStructSave\Maps\TestStructSave.unr': Can't find Class in file 'Class TestStructSave.TestStructSave'
Warning: Failed to load 'Level None.MyLevel': Can't find Class in file 'Class TestStructSave.TestStructSave'
Critical: appError called:
Critical: Failed to enter H:\Games\UT\dev\TestStructSave\Maps\TestStructSave.unr: Can't find Class in file 'Class TestStructSave.TestStructSave'
Critical: Windows GetLastError: Der Vorgang wurde erfolgreich beendet. (0)
Exit: Executing UObject::StaticShutdownAfterError
Exit: Executing UWindowsClient::ShutdownAfterError
Log: DirectDraw End Mode
Critical: UGameEngine::Init
Critical: InitEngine
Exit: Exiting.
Uninitialized: Name subsystem shut down
Uninitialized: Log file closed, 03/07/21 12:26:51
CriticalError.jpg
CriticalError.jpg (19.25 KiB) Viewed 588 times
Attachments
TestStructSave-2021-03-07.7z
Complete dev tree including source, map and compiled U file
(3.18 KiB) Downloaded 10 times
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Buggie
Godlike
Posts: 2742
Joined: Sat Mar 21, 2020 5:32 am

Re: Can't find Class in file ...

Post by Buggie »

TestStructSave.u mean Unreal Package with name TestStructSave.
TestStructSave.unr mean Unreal Package with name TestStructSave.
So you have conflicting package name, because UT do not care about where package located in maps, System, Audio, Music, Textures or whatever.
Do not create duplicates for same Package name in different folders.

Error happens because in TestStructSave.unr not exists stuff which you refer.
I think in UEd this work because map loaded with temp name. Or Linker work in different way.

In any case when UT try load map it see TestStructSave, try load it, see loaded TestStructSave from .unr and do not load .u file.
Last edited by Buggie on Sun Mar 07, 2021 10:28 pm, edited 1 time in total.
User avatar
Barbie
Godlike
Posts: 2807
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Can't find Class in file ...

Post by Barbie »

:facepalm:
(And I initially thought about naming the map with another name as the mutator package...) Yes, thanks, renaming one of them to another name solves the problem, thanks.
Buggie wrote: Sun Mar 07, 2021 1:12 pmI think in UEd this work because map loaded with temp name.
Yes, the editor creates and runs a temporary file Autoplay.unr in the MAPS directory.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Post Reply