Con:executef
by gamer · in Torque Game Engine · 04/12/2006 (5:25 pm) · 3 replies
When calling a torque script function from c++ I use
Con::executef(this, 2,"myfunc",Con::getIntArg(myIntVar));
to convert an int variable and pass it to myfunc, I use Con::getIntArg(). But I can't find a function that converts nonprimitive datatypes, such as a Point3F.
any idea?
thanks
Con::executef(this, 2,"myfunc",Con::getIntArg(myIntVar));
to convert an int variable and pass it to myfunc, I use Con::getIntArg(). But I can't find a function that converts nonprimitive datatypes, such as a Point3F.
any idea?
thanks
About the author
#2
04/12/2006 (5:40 pm)
Or if you want it as a space seperated stringchar* pBuffer = Con::getReturnBuffer(64); dSprintf(pBuffer, 64, "%f %f %f", myPoint3F.x, myPoint3F.y, myPoint3F.z); Con::executef(this, 2,"myfunc", pBuffer);
#3
thanks.
04/12/2006 (5:44 pm)
I see, so there's no complex type other than primitives(string,int,etc) that I can pass in to the torque script? I guess that make sense.thanks.
Torque 3D Owner Matthew Langley
Torque