error C2653: 'operatorglobal namespace'''

Started by
1 comment, last by WitchLord 19 years, 7 months ago
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
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)
I've fixed the error for 1.9.0 WIP 3 that will be uploaded later today (I hope).

Thanks for letting me know.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement