"Can't find class 'package.resource'" even if it exists

Discussions about Coding and Scripting
Post Reply
User avatar
PrinceOfFunky
Godlike
Posts: 1200
Joined: Mon Aug 31, 2015 10:31 pm

"Can't find class 'package.resource'" even if it exists

Post by PrinceOfFunky »

It's not the first time I face a similar issue, my case right now is:
"Error, Can't find ScriptedTexture 'Scripted.CondemnedScroll'"
where the line of code is:
"ScriptedTexture = ScriptedTexture'Scripted.CondemnedScroll';"
from within a class expanding ScrollingMessageTexture.
I copied the meta-class (ScriptedTexture'Scripted.CondemnedScroll) from one of those ScrollingMessageTexture in DM-Morpheus, so how is it the compiler cannot find the texture?
p.s. It happens even with certain sounds.
"Your stuff is known to be buggy and unfinished/not properly tested"
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: "Can't find class 'package.resource'" even if it exists

Post by Higor »

Code: Select all

class Subclass expands Superclass;
#exec obj load file="../Textures/Scripted.utx" package=Scripted
User avatar
PrinceOfFunky
Godlike
Posts: 1200
Joined: Mon Aug 31, 2015 10:31 pm

Re: "Can't find class 'package.resource'" even if it exists

Post by PrinceOfFunky »

Higor wrote:

Code: Select all

class Subclass expands Superclass;
#exec obj load file="../Textures/Scripted.utx" package=Scripted
Why are some meta-classes recognized automatically, and some aren't?
And thank you for the reply :D

EDIT: And where could I find fonts? I found out fonts are stored into texture packages, but how can I view them?
"Your stuff is known to be buggy and unfinished/not properly tested"
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: "Can't find class 'package.resource'" even if it exists

Post by Barbie »

PrinceOfFunky wrote:Why are some meta-classes recognized automatically, and some aren't?
There is a section [Editor.EditorEngine] in the INI file that is used (usually UnrealTournament.ini) where packages can be loaded with "EditPackages=EnterPackageNameHere". (From what I have noticed only U-files are possible there.)
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
PrinceOfFunky
Godlike
Posts: 1200
Joined: Mon Aug 31, 2015 10:31 pm

Re: "Can't find class 'package.resource'" even if it exists

Post by PrinceOfFunky »

Barbie wrote:
PrinceOfFunky wrote:Why are some meta-classes recognized automatically, and some aren't?
There is a section [Editor.EditorEngine] in the INI file that is used (usually UnrealTournament.ini) where packages can be loaded with "EditPackages=EnterPackageNameHere". (From what I have noticed only U-files are possible there.)
Ohhh, now I got it, thank you! It's like importing dependencies then, and the EditPackages it's like a dependency table.
"Your stuff is known to be buggy and unfinished/not properly tested"
User avatar
Wormbo
Adept
Posts: 258
Joined: Sat Aug 24, 2013 6:04 pm
Contact:

Re: "Can't find class 'package.resource'" even if it exists

Post by Wormbo »

It is recommended you compile code with the default EditPackages list (only include dependencies for custom code packages) and explicitly load resource packages through "#exec obj load" in one of the classes that needs the resource.
Post Reply