Hi ! I have written a simple function in a class like this :
class myClass
{
public:
/* other members */
double xyz(unsigned int id, unsigned int valIndex, unsigned int tupleIndex) const
{
return id * valIndex * tupleIndex;
}
bool createScriptingEngine
{
/* must-be-done stuff */
ScriptingEngine->RegisterGlobalFunction(
"double xyz(uint, uint, uint)",
asMETHOD(myClass, xyz),
asCALL_THISCALL_ASGLOBAL,
this);
/* other stuff */
}
/* other members */
};
After I created an instance of myClass and called createScriptingEngine function. Then when i tried to run the following script :
class ng
{
/* other members */
private uint index;
private uint ngId; /* id of numgen */
int getIntTupleElement(uint i)
{
return xyz(ngId, index, i);
}
/* other members */
}
/* other things */
And I got the error : No matching signatures to 'xyz(uint&, uint&, uint) . So the questions are : Why do I get this error ? AND How can i fix it ???