Unable to instantiate non-conobject class
by Jason Campbell · in Torque 3D Beginner · 01/31/2015 (8:03 am) · 5 replies
I've finally got around to trying out the Tactical AI Kit for 3.5 I got last year and it's been good to learn how to compile T3D. I got it finally compiled without errors and all seemed good, however I get this error in the Airport.mis that comes with TAIK but it stems from markers.cs and three datablocks.
core/art/datablocks/markers.cs (42): Unable to instantiate non-conobject class CoverMarkerData
core/art/datablocks/markers.cs (49): Unable to instantiate non-conobject class CoverMarkerData
core/art/datablocks/markers.cs (55): Unable to instantiate non-conobject class CoverMarkerData
This is lines 42 thru 59
coverMarker.cpp and coverMarker.h where included in the solution so I don't know what went wrong.
If anyone could point me in a direction that would be much appreciated.
Thanks
core/art/datablocks/markers.cs (42): Unable to instantiate non-conobject class CoverMarkerData
core/art/datablocks/markers.cs (49): Unable to instantiate non-conobject class CoverMarkerData
core/art/datablocks/markers.cs (55): Unable to instantiate non-conobject class CoverMarkerData
This is lines 42 thru 59
datablock CoverMarkerData(CoverPosMarker2)
{
classname = "CoverPosMarker";
category = "Misc";
shapeFile = "core/art/shapes/taik/covermarker.dts";
};
datablock CoverMarkerData(SpawnMarker2)
{
category = "Misc";
shapeFile = "core/art/shapes/taik/spawnMarker.dae";
};
datablock CoverMarkerData(LandmarkMarker)
{
category = "Misc";
shapeFile = "core/art/shapes/taik/landmark.dae";
};coverMarker.cpp and coverMarker.h where included in the solution so I don't know what went wrong.
If anyone could point me in a direction that would be much appreciated.
Thanks
#2
01/31/2015 (2:07 pm)
Thank you Richard, I'm deciphering your instructions. Afraid I'm a VS noob. I think I've got it to the point of the breakpoint in VS. It wants me to set it to a function. When you say constructor, do you mean coverMarker.cpp?
#3
Additionally, look for something like
somewhere in the CoverMarkerData declaration in coverMarker.h and
somewhere in the CoverMarkerData definition in coverMarker.cpp. If they're missing then something horrible has probably happened; that code used to work and that requirement hasn't changed in over a decade.
01/31/2015 (2:38 pm)
Yeah, in that file you should find a function with the same name as the object and no return type. That's the constructor.Additionally, look for something like
DECLARE_CONOBJECT( CoverMarkerData );
somewhere in the CoverMarkerData declaration in coverMarker.h and
IMPLEMENT_CONOBJECT( CoverMarkerData );
somewhere in the CoverMarkerData definition in coverMarker.cpp. If they're missing then something horrible has probably happened; that code used to work and that requirement hasn't changed in over a decade.
#4
01/31/2015 (6:21 pm)
Does everything else appear to work properly? Usually that error means the class isn't defined in C++, which is often due to having compiled improperly, or using the wrong executable.
#5
02/01/2015 (8:19 am)
I had Active Solution Configuration set to Debug, changing it to Release seemed to fix it. I guess I still have a lot to learn because I don't really know what that means. Thanks guys.
Torque Owner Richard Ranft
Roostertail Games