Game Development Community

general C++ help, adding new class

by Andy Simon · in Torque 3D Professional · 08/17/2009 (11:12 pm) · 3 replies

Hey guys,

I need some help adding a custom AI class I made based off AIPlayer. There is something I'm not doing correctly because if I try to include aiElevator.h using include "/T3D/aiElevator" in aiElevator.cpp, compiler says aiElevator.h - no such file exists and it cant find the isZero math function (unknown identifier, but i have include /Math/mMatrix.h, which is where isZero is defined).

aiElevator.h and aiElevator.cpp were added into the MyprojectDLL/T3D/ and the include statement in the .cpp looks like include "T3D/aiElevator.h" however if I put just include "aiElevator.h" everything compiles but my code doesn't seem to work (but it could be a bug though)

I know this is just something stupid I'm doing but I'm just not sure how to add in new classes to work with the engine the right way. Any help would be awesome!


#2
08/18/2009 (2:12 am)
I recall isZero became mIsZero?
check it.
I may be mistaken, but I recall having the same problem a short while ago.
(not at my main pc right now)
#3
08/18/2009 (2:14 am)
Wow i completely missed that one. VS got me confused with the buildfiles folder in the MyProjects folder, long story. Thanks!

Edit:
Yeah isZero is actually mIsZero as well