Game Development Community

Torque compile error

by Ronald J Nelson · in Torque Game Engine · 09/15/2005 (11:18 pm) · 13 replies

Hey I tried to compile 1.4 and when it tried to compile the Torque Tool lib I get this error and then of course anything else that needed access to the lib fails too.

c:\cvsmodules\torque\torque\engine\gui\utility\guitransitionctrl.cc(67) : error C4716: 'GuiVectorFieldCtrl::onAdd' : must return a value

#1
09/16/2005 (7:40 am)
I am getting it also. I don't see the file in the one off the website, only from the cvs. Was thinking of just commenting that function out for now.
#2
09/16/2005 (7:54 am)
Website??? Where?
#3
09/16/2005 (8:08 am)
This one :-)

Got around it by adding return true; at the end of the function for now. Not sure if this is the best thing to do. I need to dig through the function some more. I am just getting started with torque.

bool GuiVectorFieldCtrl::onAdd()
{
   mVectorField = new VectorField(Point2I(16,21));
   mTestTexture = new TextureHandle("common/TestMap", BitmapTexture);

   mFeedbackTexture.setUpdateRect(mBounds);
   mClearColor.set(1.0f, 0.0f, 0.0f, 1.0f);
   return true;
}
#4
09/16/2005 (8:09 am)
Seems like the return value was left out. This at least lets the compile go through.
#5
09/16/2005 (8:10 am)
Cool thanks I will try this
#6
09/16/2005 (8:15 am)
Any luck? Worked for me.
#7
09/16/2005 (8:19 am)
Yup worked fine. Thanks Matt.
#8
09/16/2005 (8:22 am)
You're Welcome, I am going to try and look into this function to make sure that true is an appropriate return value. Luckily since it is a boolean, we really only have two choices ;-)
#9
09/16/2005 (8:24 am)
Got to love 50/50 odds
#10
09/17/2005 (3:54 am)
True is correct, thanks for posting this fix, guys! :)

Will be rolling it into CVS soon. #406.
#11
09/17/2005 (7:51 am)
Thanks for the reply Garney.
#12
09/17/2005 (8:28 am)
Yeah Thanks you two
#13
09/24/2005 (11:39 am)
Thanks I was getting worried