Page 1 of 1

Problem compiling,

PostPosted: Thu Jan 12, 12 8:02 am
by bambi
Ok, I managed through sheer brilliance to weed down 1333 classes to 300+ classes.

And now when I try to compile, it says,

Code: Select all
Analyzing...


Its been around 5 mins...I think I did something wrong?

PostPosted: Thu Jan 12, 12 11:54 am
by ynnaD
Had you compiled it with the 1333 classes before you weeded it down?

Might just be taking a fair while trying to adjust to the loss of so many classes

PostPosted: Thu Jan 12, 12 12:31 pm
by Mastakilla
On BeyondUnreal I found this;

DependsOn(classname)
Specifies a class that must be parsed before this one. This is only necessary if the class is in the same package and declares a struct or enum type this class wants to use. Note that parent classes and implemented interfaces are always parsed before child classes. Only one class can be specified in the dependson definition, but you can add multiple dependson definitions per class declaration.
Important: The compiler is quite sensitive to bad dependson definitions. If the compiler gets stuck or crashes at the "Analyzing..." stage, make sure your dependson definitons specify valid class names in the same package and do not create circular dependencies.

PostPosted: Thu Jan 12, 12 7:01 pm
by bambi
IDK, I'm just moving things to see if the compiler will work. This is definitely depressing

PostPosted: Thu Jan 12, 12 8:39 pm
by bambi
EUREKA!!

It is compiling in parts now.

Problem noted: class HCDog expands HCDog;

leads to "Analyzing...."


ALSO! Why can't I overried a parent function?

The compiler says that the function differs and then exits.

PostPosted: Thu Jan 12, 12 9:04 pm
by Alex
If you could show us the parent function and the function you're trying to make, we could tell you why.

PostPosted: Thu Jan 12, 12 9:04 pm
by Kalman11
Maybe you typed it wrong e.g. you typed function Tick() instead function Tick(float deltatime)

PostPosted: Thu Jan 12, 12 9:05 pm
by Gishank
How do you mean override? You can't have a duplicate of a function as the game engine doesn't know which to use.

(going from memory here, there may be a way herpderp)

PostPosted: Sat Jan 14, 12 7:05 pm
by ~ô¿ô~Nobody~
Gishank wrote:How do you mean override? You can't have a duplicate of a function as the game engine doesn't know which to use.

(going from memory here, there may be a way herpderp)
No.

You CAN override functions. The engine automatically calls the function version of the most specific class, due to late binding.

PostPosted: Fri Jan 27, 12 3:25 am
by bambi
Nobody, in English plz.

what do you mean you can? The compiler won't let me have a function thats different from the parent class.

PostPosted: Fri Jan 27, 12 5:49 am
by Kalman11
I'm very newbie in coding, but not the Super.<function> is the override?

PostPosted: Fri Jan 27, 12 8:52 am
by Alex
bambi wrote:Nobody, in English plz.

what do you mean you can? The compiler won't let me have a function thats different from the parent class.

You can simply overwrite it, you just need to make sure the attributes are the same ( thus if the parent has FunctionA(string B, int C), you need to have FunctionA(string B, int C) as well, not just FunctionA() )

Kalman11 wrote:I'm very newbie in coding, but not the Super.<function> is the override?

That calls the same function in the parent class, thus doesn't override it. You must call Super.FunctionA() from within your own FunctionA().