Jump to content
  • Advertisement
Sign in to follow this  
Davaris1

RegisterObjectType returns asINVALID_NAME

This topic is 2649 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'm trying to get my first script working using the C4 String class. Unfortunately it is hitting an assert and is returning asINVALID_NAME here:

r = engine->RegisterObjectType("String<>", sizeof(String<>), asOBJ_VALUE | asOBJ_APP_CLASS_CDAK); Assert( r >= 0 );


I have replaced string with String<> all through scriptstdstring.cpp, so I am not sure what I should do. Any suggestions?

Share this post


Link to post
Share on other sites
Advertisement
"String<>" is not a valid type name in angelscript. Just remove the <> and the registration should work.

Remember the type name in angelscript doesn't have to match the type name in C++.

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!