Cory's Seperate camera tutorial compilation Error
by Antonios Dimitrelis · in Technical Issues · 04/01/2008 (2:49 am) · 3 replies
Hello everybody! :)
In our project we are facing a big problem with the camera and I was hoping to get some help here in case that someone solved this one.
What the problem is that we are getting overloaded function errors everytime we are adding his code into the latest Torque Build (TGE 1.5.2).
If anyone has a solution on this or a updated code that might function with the latest torque build it would be greatly appreciated if you could share your knowledge with me. :)
Thanks a lot in advance!
In our project we are facing a big problem with the camera and I was hoping to get some help here in case that someone solved this one.
What the problem is that we are getting overloaded function errors everytime we are adding his code into the latest Torque Build (TGE 1.5.2).
If anyone has a solution on this or a updated code that might function with the latest torque build it would be greatly appreciated if you could share your knowledge with me. :)
Thanks a lot in advance!
#2
I added these to GameConnection.cc right after the console method for getControlObject:
ConsoleMethod( GameConnection, setCameraObject, bool, 3, 3, "(ShapeBase object)")
{
ShapeBase *gb;
if(!Sim::findObject(argv[2], gb))
return false;
object->setCameraObject(gb);
return true;
}
ConsoleMethod( GameConnection, getCameraObject, S32, 2, 2, "")
{
argv;
SimObject* cp = object->getCameraObject();
return cp ? cp->getId(): 0;
}
ConsoleMethod( GameConnection, clearCameraObject, void, 2, 2, "")
{
object->setCameraObject(NULL);
}
That is where my problem and only problem of the overloaded function.
04/02/2008 (10:50 am)
I am receiving those errors and I am following what is in the documentation. The compiler I am using is Visual C++ 2005 Express. For the overloaded error the arguments are the same but asking for different declared variables. From the tutorial beginning is where the problem begins. http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4720I added these to GameConnection.cc right after the console method for getControlObject:
ConsoleMethod( GameConnection, setCameraObject, bool, 3, 3, "(ShapeBase object)")
{
ShapeBase *gb;
if(!Sim::findObject(argv[2], gb))
return false;
object->setCameraObject(gb);
return true;
}
ConsoleMethod( GameConnection, getCameraObject, S32, 2, 2, "")
{
argv;
SimObject* cp = object->getCameraObject();
return cp ? cp->getId(): 0;
}
ConsoleMethod( GameConnection, clearCameraObject, void, 2, 2, "")
{
object->setCameraObject(NULL);
}
That is where my problem and only problem of the overloaded function.
#3
04/04/2008 (12:40 am)
What Dwayne said is the problem! ^^
Torque Owner Ted Lilljegren
Also, what kind if compiler do you use?