looks like bug with namespaces in revision 1380

Started by
0 comments, last by WitchLord 11 years, 8 months ago
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.
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

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