Game Development Community

(solved)Helicopter, Helicopter, Pilot Man-must have to modify source file for T3D beta3

by Ahsan Muzaheed · in Torque 3D Professional · 03/27/2011 (12:41 pm) · 15 replies

http://www.torquepowered.com/community/resource/view/19569/2
Helicopter, Helicopter, Pilot Man....
by Sean Rice

i have deleted all of my previous problem in this thread as those has been solved.
so u will not see any similarity with the comments in below.

here are problems i have faced with this resource:

problem 1:
problem was with different source code folder structure in beta 3.
and also there was different overloaded functions in different source files.
this all has been solved in Alfio Saitta's ported code for beta 3.it also works in 1.1 Preview.
see here:
http://www.garagegames.com/community/resources/view/19569/2#comment-174380


problem 2:
the most important was the solution of "Unable to instantiate non-conobject class heliVehicle".

most probably it is a bug of visual studio 2008.after searching in google i have found many solution.but those did not work.and there is no 100% solution of this, as the main reason is still unknown(except the error in coding).
but it came out by my try that if u compile t3d source in dos mode with vs 2008 then there will be no non-conobject error until u make any error in code.
so i had compile sources in dos mode.that works fine.i have never see this error in any other works.but in gui mode(in vs 2008's compile option)u always have to face this error

problem 3:
LINK : fatal error LNK1000: Internal error during IncrBuildImage
it is another bug of vs 2008:
see here:
http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/801ba6d7-a284-4b5d-a75b-3652138d6dff

u have to install a hotfix from here:
https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=11399


problem 4:
sometimes i have to face this errors:
1>c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\vehicles\helivehicle.cpp(147) : error C2065: 'TypeSFXProfilePtr' : undeclared identifier
1>c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\vehicles\helivehicle.cpp(148) : error C2065: 'TypeSFXProfilePtr' : undeclared identifier
1>c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\vehicles\helivehicle.cpp(164) : error C2065: 'TypeParticleEmitterDataPtr' : undeclared identifier
1>c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\vehicles\helivehicle.cpp(165) : error C2065: 'TypeParticleEmitterDataPtr' : undeclared identifier
1>c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\vehicles\helivehicle.cpp(166) : error C2065: 'TypeParticleEmitterDataPtr' : undeclared identifier
1>c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\vehicles\helivehicle.cpp(167) : error C2065: 'TypeParticleEmitterDataPtr' : undeclared identifier
1>c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\vehicles\helivehicle.cpp(293) : error C2660: 'Vehicle::onNewDataBlock' : function does not take 1 arguments
1>c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\vehicles\helivehicle.cpp(656) : error C2660: 'ParticleEmitter::onNewDataBlock' : function does not take 1 arguments

do not know how it was solved.but may be solution of problem 3 is the solution of this.
can anybody figure out why this errors was?

About the author

Torque 3D enthusiastic since 2010.Have been working in several T3D projects besides of Unreal Engine 4 and Unity 3D. NEED a hand with your project? SHoot me a mail. http://www.garagegames.com/community/forums /viewthread/138437/


#1
03/27/2011 (1:45 pm)
Sounds like you've done everything right. If i had to guess (by looking at the code you posted), your issue might be related to the:
shapeFile = "\My Projects\helicopter\game\art\shapes\iroquis\iroquis.dts";
You don't have to define the entire path when dealing with paths in torque. Instead you can just start the path from the root directory:
shapeFile = "art\shapes\iroquis\iroquis.dts";

If this didn't fix the problem post your console.log file here (located at the root of your game dir) (pastebin.com is a good place if you don't have any uploading site). Then it will be easier to help :)

Anyways, hope it helps :P

Also, not that it is a problem, but MarkupLite is your friend, for marking code and such
#2
03/27/2011 (3:15 pm)
sorry.
during posting this thread i have copy paste: "\My Projects\helicopter\game\art\shapes\iroquis\iroquis.dts"

but in my orgina file i have used: shapeFile = "art\shapes\iroquis\iroquis.dts";

so it is not the problem.

here is log file:

http://www.mediafire.com/?amx3ix7dgizyg6r

#3
03/27/2011 (3:33 pm)
Hmm, by looking at your console, it seems that; either everything works as it should and your helicopter is there somewhere, or the helicopter files aren't executed.

To test if it actually worked, but the helicopter for some reason didn't appear in the editor, you can try to add it by:
new heliVehicle(){
      dataBlock = DefaultHeli;
   };
If you get some error by calling this in the console, then the problems lies elsewhere. Call it, and report back with the error (if any), it will tell where the problem lies.
#4
03/27/2011 (6:05 pm)
i have done this:
in default.bind.cs:
moveMap.bindCmd(keyboard, "l","commandToServer('test');", "");

in commands.cs:
function serverCmdtest(%val)
{
new heliVehicle(){
dataBlock = DefaultHeli;
};
}

in console.log it produces:

Mapping string: test to index: 6
177: Unable to instantiate non-conobject class heliVehicle.

and here is new log file:
http://www.mediafire.com/?cpac31uryadbkck


Marcus,thanks a lot.
#5
03/28/2011 (12:51 am)
Quote:177: Unable to instantiate non-conobject class heliVehicle.
Yeah, this sounds familiar. This error is the one you get when you're trying to create an object from a class that doesn't exist. Are you sure you've compiled your VC project (Build->Build Solution/Project or Debug->Build Solution/Project)? If not you might wanna look at this.
#6
03/28/2011 (6:03 am)
Or at least make sure that besides adding the source and header file, that you "add" the files to the project (VC won't compile everything sitting in those folders). If they don't show up in the Solution Explorer, then that's your problem.
#7
03/28/2011 (2:07 pm)
Marcus:
that is the only way,so have done by that.

ted:
i have tested that by entering a wrong syntax in both file.compiler found that error.so compiler using that file.

my error in log file was:
Unable to instantiate non-conobject class heliVehicle.

and here i have found a post
(http://www.garagegames.com/community/forums/viewthread/101223)
about this error:
"'Unable to instantiate non-conobject class GuiRadarTSCtrl"

they are saying it was for multiple directX version.
i am using windows7.it have dx10
and
for playing game i have installed dx9.

is that the reason for my error?

i have a net connection for 7 hour(from 1 a.m to 8 a.m)
so i have a very little time to find solution.
thanks



#8
03/28/2011 (3:33 pm)
Well, I can with complete insurance say that the class heliVehicle doesn't exist in your build. So unless you've been renaming your class, the problem is compiling related. Unfortunately it's kinda hard to tell what the problem could be without knowing exactly your compiling settings are, and how you're compiling (posting this wouldn't help either :/). The only thing I can imagine it could be, is that you're running the release build while you're building debug, vice-versa.

Sorry I can't help ya more :/,
Good Luck finding the problem =P
#9
03/30/2011 (7:18 pm)
Quote:
i have modified(as told by Sean Rice):
source/T3D/vehicle.h
source/T3D/vehicle.cpp

have added
heliVehicle.cpp
and
heliVehicle.h
in
Engine\source\T3D\vehicles

You indicate that you have added these files to your file structure, but have you added them to your project? This is done inside of VC Studio 20xx by right clicking on the vehicles folder and selecting Add -> Existing Item and then browsing to the folder and selecting the helicopter files. Simply adding them to the folder structure does not allow the files to be loaded into the Project.
#11
05/12/2011 (10:17 am)
Anyone have the T3D 1.1 B3 source files? Alfio's link doesn't work anymore. Thanks.
#12
05/12/2011 (10:18 am)
Julian, I will shoot these over to you later tonight.
#13
05/12/2011 (10:21 am)
Sean - cheers fella. In dire need of them :)
#14
05/12/2011 (1:14 pm)
I have edited my post , and i have insert the new url.

DOWNLOAD
#15
05/12/2011 (1:22 pm)
Thanks Sean / Alfio.