• Advertisement
Sign in to follow this  

error C2653: 'operatorglobal namespace'''

This topic is 4892 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

m_pEngine->RegisterObjectMethod("Data", "bool GetAttributeTotal(string tag, int& i)", asMETHODPR(CData, GetAttributeTotal, (string, int&), bool), asCALL_THISCALL); d:\Code\Lands\CSScripting.cpp(226): error C2653: 'operator``global namespace''' : is not a class or namespace name Any idea what might be causing this error? GetAttributeTotal is overloaded, and asMETHODPR seems like the correct macro to use, but I can't seem to get it to work... J

Share this post


Link to post
Share on other sites
Advertisement
Ok, I found the problem. I'm assuming this is already being addressed in the current WIP, but there was a typo:

#define asMETHODPR(c,m,p,r) asSMethodPtr<sizeof(void (::*)())>::Convert((r (c::*)p)(&c::m))

Needs to be:

#define asMETHODPR(c,m,p,r) asSMethodPtr<sizeof(void (c::*)())>::Convert((r (c::*)p)(&c::m))

(using 1.8.1)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement