Jump to content
  • Advertisement
Sign in to follow this  
_Engine_

looks like bug with namespaces in revision 1380

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

Hi

I recently try revision 1380 and found follow bug - if call engine->SetDefaultNamespace then register property with RegisterGlobalProperty then i got error - 'Identifier ".." not is data type'. If I remove call engine->SetDefaultNamespace than property registered are corectly. I hope this is bug not feature.

Share this post


Link to post
Share on other sites
Advertisement
There was a bug, which I've fixed in revision 1381. However, AngelScript probably still doesn't work like you expect.

Currently AngelScript doesn't search for symbols in parent namespaces, so even if the type is declared for example in the global namespace you'll have to explicitly tell AngelScript to look there with the scope operator, ::, otherwise you'll get the error "Identifier is not a data type" error.


RegisterStdString(engine);
engine->SetDefaultNamespace("mynamespace");
engine->RegisterGlobalProperty("::string value", &value);


The recursive search in parent namespaces will be implemented in a future release.

Regards,
Andreas

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!