Original Post
Because it might be a bug, it reports. The following error occurs and the setter doesn't operate correctly. "The property 'FileName' has mismatching types for the get and set accessors" ////////// CMyClass ////////// // static void CMyClass::set_FileName_Generic(asIScriptGeneric *gen) { ..... } void CMyClass::set_FileName(const std::string &strText) { ..... } ////////// Register type1 ////////// r = engine->RegisterObjectMethod("CMyClass", "void set_FileName(const string ∈)", asFUNCTION(CMyClass::set_FileName_Generic), asCALL_GENERIC); assert(r>=0); ////////// Registertype2 ////////// r = engine->RegisterObjectMethod("CMyClass", "void set_FileName(const string ∈)", asMETHODPR(CMyClass, set_FileName, (const std::string &), void), asCALL_THISCALL); assert(r>=0); ////////// Script typeA ////////// // Register type1 OK // Register type2 OK CMyClass my; my.set_FileName("c:\\test.txt"); ////////// Script typeB ////////// // Register type1 Error // Register type2 Error CMyClass my; my.FileName = "c:\\test.txt";