Register object failed ( Solved )
by Elias Ferreira Gomes · in Torque Developer Network · 09/11/2009 (6:01 pm) · 3 replies
The problem begin when I created a class "A", and this class it's a inheritance of the RTSBuilding class, and the class "B" and class "C" are inheritance of the class "A", i did some new classes and all them works, just this classes with inheritance dont.
I make this classes in de Visual Studio 2005 and tyring to create the objects in script.
I trying to do something like that.
* VS 2005 .h
#include "game/RTS/RTSBuilding.h"
#include "console/simBase.h"
class A : public RTSBuilding
{
protected:
typedef RTSBuilding Parent;
}
class B : public A
{
protected:
typedef A Parent;
}
class C : public A
{
protected:
typedef A Parent;
}
* And the object declaretion in script
new B(Bobj) {};
new C(Cobj) {};
Some one can help me?
I make this classes in de Visual Studio 2005 and tyring to create the objects in script.
I trying to do something like that.
* VS 2005 .h
#include "game/RTS/RTSBuilding.h"
#include "console/simBase.h"
class A : public RTSBuilding
{
protected:
typedef RTSBuilding Parent;
}
class B : public A
{
protected:
typedef A Parent;
}
class C : public A
{
protected:
typedef A Parent;
}
* And the object declaretion in script
new B(Bobj) {};
new C(Cobj) {};
Some one can help me?
#2
09/13/2009 (3:02 pm)
Yes, the place where i work have.
#3
And in the time to create the objects in script, i just did a declaration of the classes inheritance.
So, it's something lije that:
* VS 2005 .h
class A : public RTSBuilding
{
protected:
typedef RTSBuilding Parent;
}
class B : public SimObject
{
protected:
typedef SimObject Parent;
}
class C : public SimObject
{
protected:
typedef SimObject Parent;
}
* And the object declaretion in script
new B(Bobj:A) {};
new C(Bobj:A) {};
I searching in so many threads, but i don't remember a link to put here,
i hope this help some one.
09/14/2009 (3:20 pm)
The problem was resolved, in the VS 2005, the classes inheritance are SimObject.And in the time to create the objects in script, i just did a declaration of the classes inheritance.
So, it's something lije that:
* VS 2005 .h
class A : public RTSBuilding
{
protected:
typedef RTSBuilding Parent;
}
class B : public SimObject
{
protected:
typedef SimObject Parent;
}
class C : public SimObject
{
protected:
typedef SimObject Parent;
}
* And the object declaretion in script
new B(Bobj:A) {};
new C(Bobj:A) {};
I searching in so many threads, but i don't remember a link to put here,
i hope this help some one.
Associate Phillip O'Shea
Violent Tulip