🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Upgrading to SVN Trunk causes registration errors

Started by
2 comments, last by WitchLord 10 years, 7 months ago

I tried to upgrade my code to the SVN trunk version of AngelScript and my previously working code is now throwing errors during type registration.

When I try to register the direction() member function of my ray() class using this call:

Engine->RegisterObjectMethod("ray", "float3 direction() const", asMETHODPR(ray, direction, (void) const, float3), asCALL_THISCALL);

I get this error message:

(0, 0) : ERR : Failed in call to function 'RegisterObjectMethod' with 'ray' and 'float3 direction() const' (Code: -7)

Any idea what's going on here? The code was working fine with an earlier version of AngelScript.

Holy crap I started a blog - http://unobvious.typepad.com/
Advertisement

-7 means asNOT_SUPPORTED. This would only be returned if the calling convention is wrong (for example use of native calling conventions when not supported).

Which version of AngelScript were you using before the upgrade? And which platform & compiler do you use?

Check the return of asGetLibraryOptions(). If the returned string contains AS_MAX_PORTABILITY then the problem may be in the as_config.h. Perhaps some change I did recently in that file caused it to no longer properly detect the platform your compiling for.

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

Xcode 5 on OS X 10.9 using the provided Xcode project with the SVN trunk. I'll post an update when I get the library options string.

Holy crap I started a blog - http://unobvious.typepad.com/

What CPU do you target? 32bit or 64bit?

Which version of AngelScript were you using before the upgrade?

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