Using a function...

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Baal Cadar
Posts: 377
Joined: Fri Oct 28, 2005 10:28 am
Contact:

Post by Baal Cadar »

Ok, I stop giving you "do this - do that" instructions. It is obvious, that you don't yet understand the problem here.
So my advice is: Learn C++. C++ is a damn complex language. The most complex imperative language I know actually. If you are not aware of the scopes-concept, you are lacking knowledge, that is essential when using a complex library like Irrlicht.

Learn about scopes (and actually understand it!) and about OO design principles too.
No offense :)
mR.haHN
Posts: 49
Joined: Wed May 03, 2006 5:37 pm

Post by mR.haHN »

Yes, I understand the problem. The problem simply was, that my "dummy-declaration" for the camera-pointer was a global declaration, while the other "real" declaration was a "local" declaration. Local variables and pointers are fully independent of global ones. And the RTS_camera simply tried to use the "dummy-declaration" because it was the only accesible declaration. Because it cant access a local variable or pointer of the main-part. And thze dummy-declaration was 0, so wanting to get the position of this creates an acces violation.

BTW: Deine Name stammt aus Gothic 1 , oder? :P
Baal Cadar
Posts: 377
Joined: Fri Oct 28, 2005 10:28 am
Contact:

Post by Baal Cadar »

Best game ever :D
Well, at least till Gothic3 maybe...
No offense :)
Post Reply