Hi Andreas,
I'm having trouble getting my script to work. Whenever I try to access application-registered global property from within namespace'd method, the script fails to compile with error "'property' is not declared".
Please note that the property in question was registered without prior setDefaultNamespace call, basically it resides in global namespace. Prefixing property references with '::' doesn't work (the error message changes to "'::property' is not declared").
Accessing global property from within script namespace
Looks like a bug that slipped in when implementing the support for namespaces.
I'll investigate it.
I'll investigate it.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
I've fixed this bug in revision 1295.
Observe that the compiler does not yet do a recursive search in parent namespaces, so you need to explicitly name the global scope with :: in order to access the global property from the function in the namespace.
Regards,
Andreas
Observe that the compiler does not yet do a recursive search in parent namespaces, so you need to explicitly name the global scope with :: in order to access the global property from the function in the namespace.
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
Popular Topics
Advertisement
Recommended Tutorials
Advertisement