Original Post
I have classes where I want script to only deal with the pointers to these classes, and to call member functions as if they were directly callable through the pointer. I ran across MethodThroughPointer that seems to do this, but I'm not sure how to use the template syntax. So you see rather than dealing with instances of class Light, script should only deal with Light* and pass that around as you usually do with pointers. Here's the output: Can I get an example of how to setup the syntax of MethodThroughPointer for this?
void ScriptLight::RegisterScriptClass(void)
{
ScriptManager::engine->RegisterObjectType("Light", sizeof(Light*), asOBJ_PRIMITIVE);
ScriptManager::engine->RegisterObjectMethod("Light", "void setType(int)", asMETHOD(Wrap::MethodThroughPointer1<void, Light*,Light,setType,int>),asCALL_CDDECL_OBJLAST);
Error 2 error C2645: no qualified name for pointer to member (found ':: *') c:\rakengine\source\engine\script\scriptlight.cpp 16
Error 3 error C2143: syntax error : missing ',' before '`global namespace'' c:\rakengine\source\engine\script\scriptlight.cpp 16
Error 4 error C2882: '`global namespace'' : illegal use of namespace identifier in expression c:\rakengine\source\engine\script\scriptlight.cpp 16
Error 5 fatal error C1903: unable to recover from previous error(s); stopping compilation c:\rakengine\source\engine\script\scriptlight.cpp 16