Me again.
I have now written an .as code that I try to compile and run.
class CMyGame
{
// Functions
void init()
{
this.m_inst.setTemplate(cast(this.m_tile));
}
void update()
{
this.m_inst.render();
}
// Member Variables
instance m_inst;
tile m_tile;
};
CMyGame game;
void init()
{
game.init();
}
void update()
{
game.update();
}
If I now try to call the function init() with:
m_iInitFuncId = m_pEngine->GetFunctionIDByDecl("game", "void init()");
if(!m_iInitFuncId)
return false;
if(m_pContext->Prepare(m_iInitFuncId) != 0)
return false;
if(m_pContext->Execute() != 0)
return false;
return true;
}
m_iInitFuncId is now 'asMULTIPLE_FUNCTIONS'. Why is that, can't as differ between class and global functions ? As I understood, to retrieve class methods one uses 'GetMethodIDxxx'.
Maddi