Advertisement Jump to content
Sign in to follow this  
Starfox

Upgrading to SVN Trunk causes registration errors

This topic is 1873 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

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.

Share this post


Link to post
Share on other sites
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.

Edited by Andreas Jonsson

Share this post


Link to post
Share on other sites

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.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!