The compiler is right, naturally. TCastleThirdPersonNavigation.AvatarHiearchy
should not compile. AvatarHiearchy
is a property of a class, and you need a class instance to use it. Solving it by adding a field ThirdPersonNavigation
is exactly what I mean by “you will not solve it by trial and error” – it’s a nonsense solution because you don’t understand what is the problem.
Caring gave you a general solution “looks like you try to use a property on a class, but it requires an instance”. Yes, it will compile but is not applicable to this particular case. There are multiple other solutions.
We rely on you having programming knowledge to solve these things on your own.
We will really not get anywhere if you lack basic Pascal knowledge. You will misunderstand all the answers and recommendations we give you. This has happened now multiple times in this thread. All the compiler errors you get are absolutely logical, you just need to learn Pascal better to understand what’s going on.
It is hard to repeat, but really again: You lack basic knowledge how to use Pascal, or at least how to use classes in Pascal. Read resources linked from More Resources to Learn Pascal | Castle Game Engine . Stop trying to solve this particular task by “trial and error”. Read about how to use classes, create simple applications, declare some simple example classes that use each other.
Please follow my advise.
At this point, this thread has reached 250 posts. And I see no sign that you actually follow our advises and “take a step back and learn”. It is really not possible (for you, or others for you) to solve this by “trial and error”.
I ask you one more time: learn Pascal. Follow that resources. Write some simple applications. Do not try to solve this task by trial and error.
We will be happy to help, but we do not have capacity to teach you Pascal from scratch. That is why we refer you to resources above.
Please, go back to learning, and let’s stop this thread.