G"> A problem calling a function using Con::executef() | Torque Game Engine | Forums | Community | GarageGames.com

Game Development Community

A problem calling a function using Con::executef()

by Stephen Bjore · in Torque Game Engine · 08/09/2006 (11:55 am) · 2 replies

I'm having a problem calling a Torquescript function from C++ using Con::executef().

I started with a function in script:
function Login_AddLobby( %lobbyName ) { ... }

and called it from C++ using:
Con::executef(Login, 2, "Login_AddLobby", itr->GetName().c_str());


This works fine. However, I wanted to create a Login namespace, so I changed the function to:
function Login::AddLobby( %lobbyName ) { ... }

and the C++ call to:
Con::executef(Login, 2, "Login::AddLobby", itr->GetName().c_str());

And now in script, I get the error: "Login::AddLobby: Unknown command."

So, I was wondering how I would go about calling my function from C++ using executef (if it's possible).

Thanks!

-Steve

#1
08/09/2006 (1:11 pm)
Stephen,

I sent you an email. In the future, please use the SDK private forums for discussions regarding the C/C++ source code of the engines.

Thanks.
#2
08/09/2006 (1:22 pm)
Robert, i'm interested in the exact same Q, could you fwd me the email also ?