Creating a Custom Object in C++ (problem)
by Steven Hine · in Torque Game Builder · 05/26/2008 (12:40 pm) · 6 replies
I believe this tutorial needs to be updated...
I have a clean compile of the engine, but the testIcon() script gives me ths error:
I've done this tutorial about 4 times now with the same results. Any help would be appreciated.
I have a clean compile of the engine, but the testIcon() script gives me ths error:
game/gameScripts/testIcon.cs (3): Unable to instantiate non-conobject class t2ditemIcon
I've done this tutorial about 4 times now with the same results. Any help would be appreciated.
About the author
#2
Shouldn't I just create a new project with the new exe. Then add my script and run? The output exe seems to be in the tgb folder.
05/26/2008 (3:22 pm)
I did run the right exe. The tutorial says to do this: Go to your SDK\games\T2D\gameScripts folder. Where would that be? The folder system is different then when this tutorial was made.Shouldn't I just create a new project with the new exe. Then add my script and run? The output exe seems to be in the tgb folder.
#3
The files you create have to be put into TGBGame not TorqueGameBuilder. Here's the new error I'm getting when running my script:
Any ideas??
05/26/2008 (5:46 pm)
Ok.. i figuered it out by looking at this thread: http://www.garagegames.com/mg/forums/result.thread.php?qt=75443The files you create have to be put into TGBGame not TorqueGameBuilder. Here's the new error I'm getting when running my script:
t2dItemIcon::transferDataBlock() - t2dItemIconDataBlock is invalid! ((NULL))
Any ideas??
#4
05/26/2008 (7:41 pm)
Well I don't know anything about the tutorial you are working on ... but it looks like you called transferDatablock and didn't pass it a valid datablock. Did you pass it null?
#5
The tileMapImageMap is not displayed when running the testIcon.cs file. I give up for today.
Thanks for all your help Phillip and James...
05/26/2008 (7:57 pm)
I got it working now. I had used t2dSceneObject instead of t2dStaticSprite for the t2dItemIcon. Everything works now except...The tileMapImageMap is not displayed when running the testIcon.cs file. I give up for today.
Thanks for all your help Phillip and James...
#6
05/26/2008 (8:59 pm)
Getting started is the hard part, you will start to understand all the little things in the engine and how to solve these small errors. I still find myself running into these trivial problems daily.
Associate Phillip O'Shea
Violent Tulip
It happens to me all the time ;)